For the latest news and information visit
The GNU Crypto project

gnu.crypto.prng
Class MDGenerator

java.lang.Object
  extended bygnu.crypto.prng.BasePRNG
      extended bygnu.crypto.prng.MDGenerator
All Implemented Interfaces:
Cloneable, IRandom

public class MDGenerator
extends BasePRNG
implements Cloneable

A simple pseudo-random number generator that relies on a hash algorithm, that (a) starts its operation by hashing a seed, and then (b) continuously re-hashing its output. If no hash algorithm name is specified in the Map of attributes used to initialise the instance then the SHA-160 algorithm is used as the underlying hash function. Also, if no seed is given, an empty octet sequence is used.

Version:
$Revision: 1.10 $

Field Summary
static String MD_NAME
          Property name of underlying hash algorithm for this generator.
static String SEEED
          Property name of seed material.
 
Fields inherited from class gnu.crypto.prng.BasePRNG
buffer, initialised, name, ndx
 
Constructor Summary
MDGenerator()
          Trivial 0-arguments constructor.
 
Method Summary
 void fillBlock()
           
 void setup(Map attributes)
           
 
Methods inherited from class gnu.crypto.prng.BasePRNG
addRandomByte, addRandomBytes, addRandomBytes, clone, init, isInitialised, name, nextByte, nextBytes, nextBytes
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MD_NAME

public static final String MD_NAME
Property name of underlying hash algorithm for this generator.

See Also:
Constant Field Values

SEEED

public static final String SEEED
Property name of seed material.

See Also:
Constant Field Values
Constructor Detail

MDGenerator

public MDGenerator()
Trivial 0-arguments constructor.

Method Detail

setup

public void setup(Map attributes)
Specified by:
setup in class BasePRNG

fillBlock

public void fillBlock()
               throws LimitReachedException
Specified by:
fillBlock in class BasePRNG
Throws:
LimitReachedException

For the latest news and information visit
The GNU Crypto project

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.