Package org.ldk.structs
Class EntropySource
- java.lang.Object
-
- org.ldk.structs.EntropySource
-
public class EntropySource extends Object
A trait that describes a source of entropy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
EntropySource.EntropySourceInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroys the object, freeing associated resources.protected void
finalize()
byte[]
get_secure_random_bytes()
Gets a unique, cryptographically-secure, random 32-byte value.static EntropySource
new_impl(EntropySource.EntropySourceInterface arg)
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
destroy
public void destroy()
Destroys the object, freeing associated resources. After this call, any access to this object may result in a SEGFAULT or worse. You should generally NEVER call this method. You should let the garbage collector do this for you when it finalizes objects. However, it may be useful for types which represent locks and should be closed immediately to avoid holding locks until the GC runs.
-
new_impl
public static EntropySource new_impl(EntropySource.EntropySourceInterface arg)
-
get_secure_random_bytes
public byte[] get_secure_random_bytes()
Gets a unique, cryptographically-secure, random 32-byte value. This method must return a different value each time it is called.
-
-