ccs.chaos
Class NoiseGrabber

java.lang.Object
  extended by ccs.chaos.NoiseGrabber

public class NoiseGrabber
extends java.lang.Object

The NoiseGrabber uses the Java Sound API to record the low-order bits of brief sound clips from the system. The idea is that you disconnect your mic, turn the gain up to 11 and record the preamp noise. This contains a useful amount of entropy.


Constructor Summary
NoiseGrabber()
          Constructs the NoiseGrabber.
 
Method Summary
 void init()
          Initialises the NoiseGrabber to read noise.
 byte[] sample(int secs)
          Sample the line for a given period and return the non-zero low-order bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoiseGrabber

public NoiseGrabber()
Constructs the NoiseGrabber.

Method Detail

init

public void init()
          throws java.io.IOException
Initialises the NoiseGrabber to read noise. Must be called before sample. Can be safely called multiple times.

Throws:
java.io.IOException

sample

public byte[] sample(int secs)
              throws java.io.IOException
Sample the line for a given period and return the non-zero low-order bytes. Samples which are zero (these are very numerous) are discarded.

Throws:
java.io.IOException