Package org.conscrypt
Class OpenSSLRandom
java.lang.Object
java.security.SecureRandomSpi
org.conscrypt.OpenSSLRandom
- All Implemented Interfaces:
Serializable
public class OpenSSLRandom extends SecureRandomSpi implements Serializable
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description OpenSSLRandom() -
Method Summary
Modifier and Type Method Description protected byte[]engineGenerateSeed(int numBytes)Generates and returns the specified number of seed bytes, computed using the seed generation algorithm used by thisSecureRandomSpi.protected voidengineNextBytes(byte[] bytes)Generates and stores random bytes in the givenbyte[]for each array element.protected voidengineSetSeed(byte[] seed)Reseeds thisSecureRandomSpiinstance with the specifiedseed.
-
Constructor Details
-
OpenSSLRandom
public OpenSSLRandom()
-
-
Method Details
-
engineSetSeed
protected void engineSetSeed(byte[] seed)Description copied from class:SecureRandomSpiReseeds thisSecureRandomSpiinstance with the specifiedseed. The seed of thisSecureRandomSpiinstance is supplemented, not replaced.- Specified by:
engineSetSeedin classSecureRandomSpi- Parameters:
seed- the new seed.
-
engineNextBytes
protected void engineNextBytes(byte[] bytes)Description copied from class:SecureRandomSpiGenerates and stores random bytes in the givenbyte[]for each array element.- Specified by:
engineNextBytesin classSecureRandomSpi- Parameters:
bytes- thebyte[]to be filled with random bytes.
-
engineGenerateSeed
protected byte[] engineGenerateSeed(int numBytes)Description copied from class:SecureRandomSpiGenerates and returns the specified number of seed bytes, computed using the seed generation algorithm used by thisSecureRandomSpi.- Specified by:
engineGenerateSeedin classSecureRandomSpi- Parameters:
numBytes- the number of seed bytes.- Returns:
- the seed bytes
-