Package org.apache.commons.crypto.random
Class OpenSslCryptoRandomNative
- java.lang.Object
-
- org.apache.commons.crypto.random.OpenSslCryptoRandomNative
-
final class OpenSslCryptoRandomNative extends java.lang.ObjectJNI interface ofCryptoRandomimplementation for OpenSSL. The native method in this class is defined in OpenSslCryptoRandomNative.h (generated at build time by javah) and implemented in the file src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c
-
-
Constructor Summary
Constructors Modifier Constructor Description privateOpenSslCryptoRandomNative()The private constructor ofOpenSslCryptoRandomNative.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidinitSR()Declares a native method to initialize SR.static booleannextRandBytes(byte[] bytes)Judges whether useOpenSslCryptoRandomNativeto generate the user-specified number of random bits.
-
-
-
Constructor Detail
-
OpenSslCryptoRandomNative
private OpenSslCryptoRandomNative()
The private constructor ofOpenSslCryptoRandomNative.
-
-
Method Detail
-
initSR
public static void initSR()
Declares a native method to initialize SR.
-
nextRandBytes
public static boolean nextRandBytes(byte[] bytes)
Judges whether useOpenSslCryptoRandomNativeto generate the user-specified number of random bits.- Parameters:
bytes- the array to be filled in with random bytes.- Returns:
- true if use
OpenSslCryptoRandomNativeto generate the user-specified number of random bits.
-
-