is.logi.crypto.random
Class PureSpinner

java.lang.Object
  |
  +--java.util.Random
        |
        +--is.logi.crypto.random.PureSpinner

public class PureSpinner
extends java.util.Random

This class uses the scheduler to generate random numbers. It counts the number of times a loop is repeated before a thread has slept for a specified number of milliseconds. The 8 lowest-order bits of these numbers are then used.

If you feel tempted to use this class, look at using RandomSpinner with a very high round parameter. If it is set to higher than 16 it will collect more entropy than the PureSpiner.

The helper class which does the actual number generation is by Henry Strickland (strix@versant.com) and Greg Noel (greg@qualcomm.com). It is based on similar C code by Matt Blaze, Jack Lacy, and Don Mitchell.

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
RandomSpinner, Serialized Form

Constructor Summary
PureSpinner()
           
 
Methods inherited from class java.util.Random
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PureSpinner

public PureSpinner()


Copyright 1997-1999 Logi Ragnarsson