All Packages Class Hierarchy This Package Previous Next Index
Class cryptix.math.PRSG
java.lang.Object
|
+----cryptix.math.PRSG
- public final class PRSG
- extends Object
A pseudo-random sequence generator based on a 160-bit LFSR (this is not
a cryptographically secure generator).
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.1.1.1 $
- Author:
- unattributed
-
PRSG(byte[])
- Creates a pseudo random number generator from the seed b.
-
clock()
- Moves the internal state on one cycle.
-
toByteArray()
- Returns the current state of the generator.
PRSG
public PRSG(byte b[])
- Creates a pseudo random number generator from the seed b.
- Parameters:
- b - the seed for this generator
- Throws: MathError
- if the seed is less than 20 bytes.
toByteArray
public synchronized byte[] toByteArray()
- Returns the current state of the generator.
- Returns:
- a 20-byte array representing the current state of the generator.
clock
public synchronized void clock()
- Moves the internal state on one cycle.
All Packages Class Hierarchy This Package Previous Next Index