Class Chacha

java.lang.Object

public class Chacha
extends NativeStruct
Wrapper for the native WolfCrypt Chacha implementation.
Version:
1.0, March 2018
Author:
Daniele Lacamera
  • Field Summary

    Fields inherited from class com.wolfssl.wolfcrypt.NativeStruct

    NULL
  • Constructor Summary

    Constructors 
    Constructor Description
    Chacha()  
  • Method Summary

    Modifier and Type Method Description
    protected void free()  
    protected void init()  
    protected long mallocNativeStruct()  
    byte[] process​(byte[] in)  
    void releaseNativeStruct()
    Releases the host data stored in a NativeStruct.
    void setIV​(byte[] IV)  
    void setKey​(byte[] Key)  

    Methods inherited from class com.wolfssl.wolfcrypt.NativeStruct

    finalize, getNativeStruct, setNativeStruct

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • releaseNativeStruct

      public void releaseNativeStruct()
      Description copied from class: NativeStruct
      Releases the host data stored in a NativeStruct. This method provides a way to release host data without depending on the garbage collector to get around to releasing it. Derived objects whose native data structures have their own free functions, should be override this method to call that function.
      Overrides:
      releaseNativeStruct in class NativeStruct
    • mallocNativeStruct

      protected long mallocNativeStruct() throws java.lang.OutOfMemoryError
      Specified by:
      mallocNativeStruct in class NativeStruct
      Throws:
      java.lang.OutOfMemoryError
    • init

      protected void init()
    • free

      protected void free()
    • setKey

      public void setKey​(byte[] Key)
    • setIV

      public void setIV​(byte[] IV)
    • process

      public byte[] process​(byte[] in)