anon.crypto
Class DSAKeyPool
java.lang.Object
anon.crypto.DSAKeyPool
public class DSAKeyPool
- extends java.lang.Object
This class starts a thread that will create DSA key pairs in the background with a low priority.
The keys may be popped for further use, while new key pairs will always be created to replace
the popped ones.
- Author:
- Rolf Wendolsky
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_keyCreationThread
private java.lang.Thread m_keyCreationThread
m_keys
private java.util.Vector m_keys
m_bInterrupted
private boolean m_bInterrupted
m_poolSize
private int m_poolSize
m_certainty
private int m_certainty
m_keyLength
private int m_keyLength
DSAKeyPool
public DSAKeyPool(int a_poolsize)
DSAKeyPool
public DSAKeyPool()
start
public void start()
stop
public void stop()
popKeyPair
public AsymmetricCryptoKeyPair popKeyPair()
- Pop a key pair from the stack. The creation of a new key pair will start immediately in the background.
If no key pair is currently available, this method will block until there is one. It the thread has been stopped,
this method will return null.
- Returns:
- the first key pair popped from the queue or null if the pool has been stopped