Class OpenSslCryptoRandomNative

java.lang.Object
org.apache.commons.crypto.random.OpenSslCryptoRandomNative

final class OpenSslCryptoRandomNative extends Object
JNI interface of CryptoRandom implementation 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 Details

  • Method Details

    • initSR

      public static void initSR()
      Declares a native method to initialize SR.
    • nextRandBytes

      public static boolean nextRandBytes(byte[] bytes)
      Judges whether use OpenSslCryptoRandomNative to generate the user-specified number of random bits.
      Parameters:
      bytes - the array to be filled in with random bytes.
      Returns:
      true if use OpenSslCryptoRandomNative to generate the user-specified number of random bits.