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

Constructor Index

 o PRSG(byte[])
Creates a pseudo random number generator from the seed b.

Method Index

 o clock()
Moves the internal state on one cycle.
 o toByteArray()
Returns the current state of the generator.

Constructors

 o 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.

Methods

 o toByteArray
 public synchronized byte[] toByteArray()
Returns the current state of the generator.

Returns:
a 20-byte array representing the current state of the generator.
 o clock
 public synchronized void clock()
Moves the internal state on one cycle.


All Packages  Class Hierarchy  This Package  Previous  Next  Index