com.ibm.crypto.provider
Class SecureRandom
java.lang.Object
java.security.SecureRandomSpi
com.ibm.crypto.provider.SecureRandom
- All Implemented Interfaces:
- Serializable
public final class SecureRandom
- extends SecureRandomSpi
- implements Serializable
This class provides a crytpographically strong pseudo-random number
generator based on the MD5 message digest algorithm.
Note that if a seed is not provided, we will generate a seed from a true
random number generator(TRNG).
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecureRandom
public SecureRandom()
SecureRandom
public SecureRandom(byte[] seed)
engineSetSeed
public void engineSetSeed(byte[] seed)
- Specified by:
engineSetSeed
in class SecureRandomSpi
engineNextBytes
public void engineNextBytes(byte[] bytes)
- Specified by:
engineNextBytes
in class SecureRandomSpi
engineGenerateSeed
public byte[] engineGenerateSeed(int numBytes)
- Specified by:
engineGenerateSeed
in class SecureRandomSpi