Class RsaKeyProvider
- java.lang.Object
- 
- org.activecomponents.udp.asymciphers.RsaKeyProvider
 
- 
- All Implemented Interfaces:
- IKeyProvider
 
 public class RsaKeyProvider extends java.lang.Object implements IKeyProvider 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static intDEFAULT_KEY_SIZEThe default key size.protected static intDEFAULT_MAX_KEYSThe default maximum number of pre-gen keys.protected static java.math.BigIntegerEXPRSA exponent.protected static booleanPARALLEL_MODEGenerating keys in parallel.protected java.util.concurrent.BlockingQueue<org.bouncycastle.crypto.AsymmetricCipherKeyPair>pregenkeysPre-generated keys.protected booleanrunningRunning flag.protected java.util.concurrent.CyclicBarriershutdownbarrierBarrier for coordinating shutdown.protected java.lang.RunnabletaskGeneration task.
 - 
Constructor SummaryConstructors Constructor Description RsaKeyProvider()Creates the provider.RsaKeyProvider(int keysize)Creates the provider.RsaKeyProvider(int keysize, int maxkeys)Creates the provider.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.crypto.AsymmetricCipherKeyPairgetKeyPair()Returns a random key pair.voidstart(IThreadExecutor texec)Starts the key generation.voidstop()Stops the key generation.
 
- 
- 
- 
Field Detail- 
EXPprotected static final java.math.BigInteger EXP RSA exponent.
 - 
DEFAULT_KEY_SIZEprotected static final int DEFAULT_KEY_SIZE The default key size.- See Also:
- Constant Field Values
 
 - 
DEFAULT_MAX_KEYSprotected static final int DEFAULT_MAX_KEYS The default maximum number of pre-gen keys.- See Also:
- Constant Field Values
 
 - 
PARALLEL_MODEprotected static final boolean PARALLEL_MODE Generating keys in parallel.- See Also:
- Constant Field Values
 
 - 
pregenkeysprotected java.util.concurrent.BlockingQueue<org.bouncycastle.crypto.AsymmetricCipherKeyPair> pregenkeys Pre-generated keys.
 - 
runningprotected volatile boolean running Running flag.
 - 
shutdownbarrierprotected java.util.concurrent.CyclicBarrier shutdownbarrier Barrier for coordinating shutdown.
 - 
taskprotected java.lang.Runnable task Generation task.
 
- 
 - 
Method Detail- 
startpublic void start(IThreadExecutor texec) Starts the key generation.
 - 
stoppublic void stop() Stops the key generation.
 - 
getKeyPairpublic org.bouncycastle.crypto.AsymmetricCipherKeyPair getKeyPair() Returns a random key pair.- Specified by:
- getKeyPairin interface- IKeyProvider
- Returns:
- Key pair.
 
 
- 
 
-