com.opensymphony.module.random
Class Yarrow

java.lang.Object
  |
  +--java.util.Random
        |
        +--com.opensymphony.module.random.Yarrow
All Implemented Interfaces:
java.io.Serializable

public final class Yarrow
extends java.util.Random

This class represents a Pseudo Random Number Generator (PRNG) as specified by the Yarrow documentation (www.counterpane.com/yarrow) Most of the code in this class is based on FreeNet's Yarrow implementation.

Author:
Scott G. Miller , Victor Salaman
See Also:
Serialized Form

Inner Class Summary
 class Yarrow.EntropySource
           
 
Field Summary
 byte[] ZERO_ARRAY
           
 
Constructor Summary
Yarrow()
           
 
Method Summary
 void acceptEntropy(Yarrow.EntropySource source, long data, int entropyGuess)
           
 void acceptTimerEntropy(Yarrow.EntropySource timer)
           
 void makeKey(byte[] entropy, byte[] key, int offset, int len)
           
protected  int next(int bits)
           
 void wipe(byte[] data)
           
 
Methods inherited from class java.util.Random
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZERO_ARRAY

public byte[] ZERO_ARRAY
Constructor Detail

Yarrow

public Yarrow()
Method Detail

next

protected int next(int bits)
Overrides:
next in class java.util.Random

acceptEntropy

public void acceptEntropy(Yarrow.EntropySource source,
                          long data,
                          int entropyGuess)

acceptTimerEntropy

public void acceptTimerEntropy(Yarrow.EntropySource timer)

makeKey

public void makeKey(byte[] entropy,
                    byte[] key,
                    int offset,
                    int len)

wipe

public void wipe(byte[] data)

See www.opensymphony.com for more information.