com.mindbright.security.prng
Class BlumBlumShub

java.lang.Object
  extended bycom.mindbright.jca.security.SecureRandomSpi
      extended bycom.mindbright.security.prng.BlumBlumShub
All Implemented Interfaces:
java.io.Serializable

public final class BlumBlumShub
extends SecureRandomSpi

See Also:
Serialized Form

Field Summary
static byte[] N
           
 
Constructor Summary
BlumBlumShub()
           
BlumBlumShub(java.math.BigInteger n, byte[] seed)
           
BlumBlumShub(byte[] seed)
           
 
Method Summary
protected  byte[] engineGenerateSeed(int numBytes)
           
protected  void engineNextBytes(byte[] bytes)
           
protected  void engineSetSeed(byte[] seed)
           
static java.math.BigInteger getBlumInteger(int bits, java.util.Random rand)
           
 int nextBits(int bits)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

N

public static final byte[] N
Constructor Detail

BlumBlumShub

public BlumBlumShub(java.math.BigInteger n,
                    byte[] seed)

BlumBlumShub

public BlumBlumShub(byte[] seed)

BlumBlumShub

public BlumBlumShub()
Method Detail

nextBits

public int nextBits(int bits)

getBlumInteger

public static java.math.BigInteger getBlumInteger(int bits,
                                                  java.util.Random rand)

engineGenerateSeed

protected byte[] engineGenerateSeed(int numBytes)
Specified by:
engineGenerateSeed in class SecureRandomSpi

engineNextBytes

protected void engineNextBytes(byte[] bytes)
Specified by:
engineNextBytes in class SecureRandomSpi

engineSetSeed

protected void engineSetSeed(byte[] seed)
Specified by:
engineSetSeed in class SecureRandomSpi