com.ibm.crypto.fips.provider
Class SecureRandom
- java.lang.Object
java.security.SecureRandomSpi
com.ibm.crypto.fips.provider.SecureRandom
All implemented interfaces:
AlgorithmStatus, java.io.Serializable
- public final class SecureRandom
- extends java.security.SecureRandomSpi
- implements java.io.Serializable, AlgorithmStatus
This class provides a cryptographically strong pseudo-random number generator based on the SHA1 message digest algorithm. Note that if a seed is not provided, we will generate a seed from a true random number generator(TRNG).
Author:
John Peck
See Also:
Constructor Summary
| Constructor and Description |
|---|
SecureRandom()
|
SecureRandom(byte[] seed)
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
engineGenerateSeed(int numBytes)
|
|
engineNextBytes(byte[] bytes)
|
|
engineSetSeed(byte[] seed)
|
|
internalGenerateSeed(int numBytes)
|
|
internalNextBytes(byte[] bytes)
|
|
internalSetSeed(byte[] seed)
|
|
isFipsApproved()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
SecureRandom
- public SecureRandom()
SecureRandom
- public SecureRandom(byte[] seed)
Method Detail
isFipsApproved
- public boolean isFipsApproved()
Module identifies if the cryptographic operation (algorithm) is FIPS certified
Specified by:
isFipsApproved in interface AlgorithmStatus
See Also:
engineSetSeed
- public void engineSetSeed(byte[] seed)
Specified by:
engineSetSeed in class java.security.SecureRandomSpi
internalSetSeed
- protected void internalSetSeed( byte[] seed)
engineNextBytes
- public void engineNextBytes(byte[] bytes)
Specified by:
engineNextBytes in class java.security.SecureRandomSpi
internalNextBytes
- protected void internalNextBytes( byte[] bytes)
engineGenerateSeed
- public byte[] engineGenerateSeed( int numBytes)
Specified by:
engineGenerateSeed in class java.security.SecureRandomSpi
internalGenerateSeed
- protected byte[] internalGenerateSeed( int numBytes)
AlgorithmStatus