cryptix.math
Class PseudoRandomStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--cryptix.math.RandomStream
              |
              +--cryptix.math.PseudoRandomStream
Direct Known Subclasses:
CSRandomStream

public class PseudoRandomStream
extends RandomStream

A class that produces pseudo-random bytes.

Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.1.1.1 $

Since:
Cryptix 2.2 or earlier
Author:
unattributed

Field Summary
protected  byte[] buf
           
protected  int len
           
protected  PRSG prng
           
protected  int ptr
           
 
Constructor Summary
PseudoRandomStream(byte[] seed)
          seed must be 20 bytes or greater (any excess is not used).
 
Method Summary
protected  void nextBuffer()
           
protected  byte nextByte()
           
protected  void seed(byte[] seed)
           
 
Methods inherited from class cryptix.math.RandomStream
read, read, read, skip
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, reset
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prng

protected PRSG prng

buf

protected byte[] buf

ptr

protected int ptr

len

protected int len
Constructor Detail

PseudoRandomStream

public PseudoRandomStream(byte[] seed)
seed must be 20 bytes or greater (any excess is not used).
Method Detail

seed

protected void seed(byte[] seed)
Overrides:
seed in class RandomStream

nextBuffer

protected void nextBuffer()

nextByte

protected final byte nextByte()
Overrides:
nextByte in class RandomStream