All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class is.logi.crypto.random.Spinner

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----is.logi.crypto.random.Spinner

public class Spinner
extends Thread
Helper class for the RandomSpinner class.


Method Index

 o guessTime(int)
Returns t such that spin(t) is larger than n.
 o main(String[])
Call with optional parameter t.
 o run()
 o spin(long)
Return the number of spins performed in t milliseconds.

Methods

 o spin
 public static int spin(long t)
Return the number of spins performed in t milliseconds.

 o run
 public void run()
Overrides:
run in class Thread
 o guessTime
 public static int guessTime(int n)
Returns t such that spin(t) is larger than n. This value may change as the load of the system changes.

 o main
 public static void main(String arg[]) throws IOException
Call with optional parameter t.

Calls spin(t) 1024 times and outputs the 8 lowest-order bits to a file named "spin.t", where t is replaced with the value of the parameter t.

If t is omitted, t=guessTime(1024) will be used.

the output of this program can be compressed to estimate the entropy of the random number generator. On my system the output does not compress at all for t>=5.


All Packages  Class Hierarchy  This Package  Previous  Next  Index