gnu.crypto.prng
public abstract class BasePRNG extends Object implements IRandom
An abstract class to facilitate implementing PRNG algorithms.
Version: $Revision: 1.12 $
| Field Summary | |
|---|---|
| protected byte[] | buffer A temporary buffer to serve random bytes. |
| protected boolean | initialised Indicate if this instance has already been initialised or not. |
| protected String | name The canonical name prefix of the PRNG algorithm. |
| protected int | ndx The index into buffer of where the next byte will come from. |
| Constructor Summary | |
|---|---|
| protected | BasePRNG(String name) Trivial constructor for use by concrete subclasses. |
| Method Summary | |
|---|---|
| void | addRandomByte(byte b) |
| void | addRandomBytes(byte[] buffer) |
| void | addRandomBytes(byte[] buffer, int offset, int length) |
| Object | clone() |
| abstract void | fillBlock() |
| void | init(Map attributes) |
| boolean | isInitialised() |
| String | name() |
| byte | nextByte() |
| void | nextBytes(byte[] out) |
| void | nextBytes(byte[] out, int offset, int length) |
| abstract void | setup(Map attributes) |
Trivial constructor for use by concrete subclasses.
Parameters: name the canonical name of this instance.