Package org.bouncycastle.crypto
Class CipherKeyGenerator
java.lang.Object
org.bouncycastle.crypto.CipherKeyGenerator
- Direct Known Subclasses:
DESKeyGenerator
public class CipherKeyGenerator extends Object
The base class for symmetric, or secret, cipher key generators.
-
Field Summary
Fields Modifier and Type Field Description protected SecureRandomrandomprotected intstrength -
Constructor Summary
Constructors Constructor Description CipherKeyGenerator() -
Method Summary
Modifier and Type Method Description byte[]generateKey()generate a secret key.voidinit(KeyGenerationParameters param)initialise the key generator.
-
Field Details
-
random
-
strength
protected int strength
-
-
Constructor Details
-
CipherKeyGenerator
public CipherKeyGenerator()
-
-
Method Details
-
init
initialise the key generator.- Parameters:
param- the parameters to be used for key generation
-
generateKey
public byte[] generateKey()generate a secret key.- Returns:
- a byte array containing the key value.
-