com.mindbright.jca.security
Class SecureRandom

java.lang.Object
  extended byjava.util.Random
      extended bycom.mindbright.jca.security.SecureRandom
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SecureRandomAndPad

public class SecureRandom
extends java.util.Random

See Also:
Serialized Form

Constructor Summary
  SecureRandom()
           
  SecureRandom(byte[] seed)
           
protected SecureRandom(SecureRandomSpi secureRandomSpi, Provider provider)
           
 
Method Summary
 byte[] generateSeed(int numBytes)
           
static SecureRandom getInstance(java.lang.String algorithm)
           
static SecureRandom getInstance(java.lang.String algorithm, java.lang.String provider)
           
 Provider getProvider()
           
static byte[] getSeed(int numBytes)
           
protected  int next(int numBits)
           
 void nextBytes(byte[] bytes)
           
 void setSeed(byte[] seed)
           
 void setSeed(long seed)
           
 
Methods inherited from class java.util.Random
nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
 
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)

SecureRandom

protected SecureRandom(SecureRandomSpi secureRandomSpi,
                       Provider provider)
Method Detail

generateSeed

public byte[] generateSeed(int numBytes)

getInstance

public static SecureRandom getInstance(java.lang.String algorithm)
                                throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

getInstance

public static SecureRandom getInstance(java.lang.String algorithm,
                                       java.lang.String provider)
                                throws NoSuchAlgorithmException,
                                       NoSuchProviderException
Throws:
NoSuchAlgorithmException
NoSuchProviderException

getProvider

public Provider getProvider()

getSeed

public static byte[] getSeed(int numBytes)

next

protected final int next(int numBits)

nextBytes

public void nextBytes(byte[] bytes)

setSeed

public void setSeed(byte[] seed)

setSeed

public void setSeed(long seed)