return p * q;
- def __init__(self, bits):
+ def __init__(self, bits=160):
"""
Constructor, specifing bits for n.
bits - number of bits
x = x>>1
return q
- def next(self, numBits):
+ def next(self, numBits=160):
self.state = (self.state**2) % self.n
- return float(self.state)/self.n
+ return self.state
def random(self):
self.state = (self.state**2) % self.n