public class OpenSSLRandom extends SecureRandomSpi implements Serializable
| Constructor and Description |
|---|
OpenSSLRandom() |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
engineGenerateSeed(int numBytes)
Generates and returns the specified number of seed bytes, computed using
the seed generation algorithm used by this
SecureRandomSpi. |
protected void |
engineNextBytes(byte[] bytes)
Generates and stores random bytes in the given
byte[] for each
array element. |
protected void |
engineSetSeed(byte[] seed)
Reseeds this
SecureRandomSpi instance with the specified seed. |
static void |
seedOpenSSLPRNGFromLinuxRNG()
Obtains a seed from the Linux RNG and mixes it into the OpenSSL PRNG (default RAND engine).
|
protected void engineSetSeed(byte[] seed)
SecureRandomSpiSecureRandomSpi instance with the specified seed. The seed of this SecureRandomSpi instance is supplemented,
not replaced.engineSetSeed in class SecureRandomSpiseed - the new seed.protected void engineNextBytes(byte[] bytes)
SecureRandomSpibyte[] for each
array element.engineNextBytes in class SecureRandomSpibytes - the byte[] to be filled with random bytes.protected byte[] engineGenerateSeed(int numBytes)
SecureRandomSpiSecureRandomSpi.engineGenerateSeed in class SecureRandomSpinumBytes - the number of seed bytes.public static void seedOpenSSLPRNGFromLinuxRNG()
NOTE: This modifies the OpenSSL PRNG shared by all instances of OpenSSLRandom and other crypto primitives offered by or built on top of OpenSSL.