cryptix.security
Class CSRandomStream

java.lang.Object
  extended byjava.io.InputStream
      extended bycryptix.math.RandomStream
          extended bycryptix.math.PseudoRandomStream
              extended bycryptix.security.CSRandomStream
Direct Known Subclasses:
FileRandomStream

public class CSRandomStream
extends PseudoRandomStream

A class that generates random bytes using a pseudo random number generator.

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

$Revision: 1.1 $

Since:
Cryptix 2.2
Author:
Systemics Ltd, David Hopwood
See Also:
SecureRandom

Field Summary
protected  SHA sha
          Deprecated.  
 
Fields inherited from class cryptix.math.PseudoRandomStream
buf, len, prng, ptr
 
Constructor Summary
CSRandomStream(byte[] seed)
          Deprecated. Creates a new Cryptographically Secure Random Stream from a seed.
 
Method Summary
 void add(byte[] entropy)
          Deprecated. Add some entropy to the generator.
protected  void nextBuffer()
          Deprecated. Sets the internal buffer, length and pointer field to a new set of random bits available for reading.
protected  void seed(byte[] seed)
          Deprecated. Reset the seed and the PRNG.
 
Methods inherited from class cryptix.math.PseudoRandomStream
nextByte
 
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

sha

protected SHA sha
Deprecated. 
Constructor Detail

CSRandomStream

public CSRandomStream(byte[] seed)
Deprecated. 
Creates a new Cryptographically Secure Random Stream from a seed. The security of this generator relies on a good seed.

Method Detail

nextBuffer

protected void nextBuffer()
Deprecated. 
Sets the internal buffer, length and pointer field to a new set of random bits available for reading.

Overrides:
nextBuffer in class PseudoRandomStream

seed

protected void seed(byte[] seed)
Deprecated. 
Reset the seed and the PRNG.

Overrides:
seed in class PseudoRandomStream

add

public void add(byte[] entropy)
Deprecated. 
Add some entropy to the generator.