org.gudy.bouncycastle.crypto
Class CipherKeyGenerator
java.lang.Object
org.gudy.bouncycastle.crypto.CipherKeyGenerator
- Direct Known Subclasses:
- DESKeyGenerator
public class CipherKeyGenerator
- extends Object
The base class for symmetric, or secret, cipher key generators.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
random
protected SecureRandom random
strength
protected int strength
CipherKeyGenerator
public CipherKeyGenerator()
init
public void init(KeyGenerationParameters param)
- 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.