part5
Class BBS_PRNG

java.lang.Object
  extended bypart5.PRNG
      extended bypart5.BBS_PRNG

public class BBS_PRNG
extends PRNG

A class that implements a BBS Pseudo-Random Bit Generator.


Constructor Summary
BBS_PRNG(java.math.BigInteger seed, java.math.BigInteger p, java.math.BigInteger q)
          A constructor that takes a seed value seed and the values needed to instantiate a BBS Pseudo-Random Bit Generator.
 
Method Summary
 int nextBit()
          A method to generate a single random bit as an integer value 0 or 1.
 
Methods inherited from class part5.PRNG
random, random
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BBS_PRNG

public BBS_PRNG(java.math.BigInteger seed,
                java.math.BigInteger p,
                java.math.BigInteger q)
         throws java.lang.Exception
A constructor that takes a seed value seed and the values needed to instantiate a BBS Pseudo-Random Bit Generator.

Throws:
java.lang.Exception
Method Detail

nextBit

public int nextBit()
            throws java.lang.Exception
A method to generate a single random bit as an integer value 0 or 1.

Specified by:
nextBit in class PRNG
Throws:
java.lang.Exception