public class SHA1PRNG_SecureRandomImpl extends SecureRandomSpi implements Serializable
To generate pseudo-random bits, the implementation uses technique described in the "Random Number Generator (RNG) algorithms" section, Appendix A, JavaTM Cryptography Architecture, API Specification & Reference.
Constructor and Description |
---|
SHA1PRNG_SecureRandomImpl()
Creates object and sets implementation variables to their initial values
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
engineGenerateSeed(int numBytes)
Returns a required number of random bytes.
|
protected void |
engineNextBytes(byte[] bytes)
Writes random bytes into an array supplied.
|
protected void |
engineSetSeed(byte[] seed)
Changes current seed by supplementing a seed argument to the current seed,
if this already set;
the argument is used as first seed otherwise.
|
public SHA1PRNG_SecureRandomImpl()
protected void engineSetSeed(byte[] seed)
engineSetSeed
in class SecureRandomSpi
seed
- - byte arrayNullPointerException
- - if null is passed to the "seed" argumentprotected byte[] engineGenerateSeed(int numBytes)
engineGenerateSeed
in class SecureRandomSpi
numBytes
- - number of bytes to return; should be >= 0.InvalidParameterException
- - if numBytes < 0protected void engineNextBytes(byte[] bytes)
engineNextBytes
in class SecureRandomSpi
bytes
- - byte array to be filled in with bytesNullPointerException
- - if null is passed to the "bytes" argument