public final class SecretKeyGenerator
extends java.lang.Object
SecretKeys.| Modifier | Constructor and Description |
|---|---|
private |
SecretKeyGenerator()
Private constructor of static class.
|
| Modifier and Type | Method and Description |
|---|---|
static javax.crypto.SecretKey |
generate(org.bouncycastle.crypto.BlockCipher cipher)
Generates a symmetric encryption key whose size is equal to the cipher block size.
|
static javax.crypto.SecretKey |
generate(int bitLength,
org.bouncycastle.crypto.BlockCipher cipher)
Generates a symmetric encryption key of the given length.
|
static javax.crypto.SecretKey |
generate(int bitLength,
org.bouncycastle.crypto.BlockCipher cipher,
java.security.SecureRandom random)
Generates a symmetric encryption key of the given length.
|
private SecretKeyGenerator()
public static javax.crypto.SecretKey generate(org.bouncycastle.crypto.BlockCipher cipher)
cipher - Cipher with with key will be used.public static javax.crypto.SecretKey generate(int bitLength,
org.bouncycastle.crypto.BlockCipher cipher)
bitLength - Desired key length in bits.cipher - Cipher with with key will be used.public static javax.crypto.SecretKey generate(int bitLength,
org.bouncycastle.crypto.BlockCipher cipher,
java.security.SecureRandom random)
bitLength - Desired key length in bits.cipher - Cipher with with key will be used.random - Randomness provider for key generation.