Package com.wolfssl.wolfcrypt
Class Rng
java.lang.Object
com.wolfssl.wolfcrypt.WolfObject
com.wolfssl.wolfcrypt.NativeStruct
com.wolfssl.wolfcrypt.Rng
public class Rng extends NativeStruct
Wrapper for the native WolfCrypt Rng implementation.
- Version:
- 1.0, March 2015
- Author:
- Moisés Guimarães
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Rng()
-
Method Summary
Modifier and Type Method Description void
free()
void
generateBlock(byte[] buffer)
void
generateBlock(byte[] buffer, int offset, int length)
byte[]
generateBlock(int length)
void
generateBlock(java.nio.ByteBuffer buffer)
void
init()
protected long
mallocNativeStruct()
void
releaseNativeStruct()
Releases the host data stored in a NativeStruct.Methods inherited from class com.wolfssl.wolfcrypt.NativeStruct
finalize, getNativeStruct, setNativeStruct
-
Constructor Details
-
Rng
public Rng()
-
-
Method Details
-
mallocNativeStruct
protected long mallocNativeStruct() throws java.lang.OutOfMemoryError- Specified by:
mallocNativeStruct
in classNativeStruct
- Throws:
java.lang.OutOfMemoryError
-
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 classNativeStruct
-
init
public void init() -
free
public void free() -
generateBlock
public void generateBlock(java.nio.ByteBuffer buffer) -
generateBlock
public void generateBlock(byte[] buffer, int offset, int length) -
generateBlock
public void generateBlock(byte[] buffer) -
generateBlock
public byte[] generateBlock(int length)
-