com.ibm.crypto.provider
Class SecureRandom

java.lang.Object
  extended by java.security.SecureRandomSpi
      extended by 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

Constructor Summary
SecureRandom()
           
SecureRandom(byte[] seed)
           
 
Method Summary
 byte[] engineGenerateSeed(int numBytes)
           
 void engineNextBytes(byte[] bytes)
           
 void engineSetSeed(byte[] seed)
           
 
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

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