iaik.security.random
Class AWT10SeedGenerator

java.lang.Object
  |
  +--iaik.security.random.SeedGenerator
        |
        +--iaik.security.random.HashObjectSeedGenerator
              |
              +--iaik.security.random.AWT10SeedGenerator

public class AWT10SeedGenerator
extends HashObjectSeedGenerator

This class generates a PRNG seed from user generated AWT events following the JDK 1.0 AWT event model. It is a subclass of HashObjectSeedGenerator and uses its API, see there for more documentation.

Version:
File Revision 14
See Also:
HashObjectSeedGenerator, AWT11SeedGenerator

Fields inherited from class iaik.security.random.SeedGenerator
seedGenListener
 
Constructor Summary
AWT10SeedGenerator()
          Generate a seed generator for the default number of random bits (currently 136).
AWT10SeedGenerator(int numBits)
          Generate a seed generator for the specified number of bits.
 
Method Summary
 boolean addEvent(Event event)
          Deprecated. use addSeedObject() instead.
protected  int extractSeedData(Object obj)
          Add the given object to the seed.
 
Methods inherited from class iaik.security.random.HashObjectSeedGenerator
addSeedObject, getMessageDigest, getSeed, getStatus, updateHash, updateHash, updateHash
 
Methods inherited from class iaik.security.random.SeedGenerator
callSeedGenListener, getDefault, getDefaultSeedGenerator, longToBytes, seedAvailable, setDefault, setDefaultSeedGenerator, setSeedGenListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWT10SeedGenerator

public AWT10SeedGenerator(int numBits)
Generate a seed generator for the specified number of bits.

AWT10SeedGenerator

public AWT10SeedGenerator()
Generate a seed generator for the default number of random bits (currently 136).
Method Detail

addEvent

public boolean addEvent(Event event)
Deprecated. use addSeedObject() instead.

This method is deprecated and supported for compatibility only. It will be removed in the next major release.

extractSeedData

protected int extractSeedData(Object obj)
                       throws IllegalArgumentException
Add the given object to the seed. The object must be an instance of java.awt.Event. This method will hash the current time, the toString() representation of the event, and System.identityHashCode(). The uncertainty per event is assumed to be 3 bits. This method is called by addSeedObject() with the object passed to it.
Overrides:
extractSeedData in class HashObjectSeedGenerator
Throws:
RandomException - if obj is not a subclass of java.awt.Event

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK