Modifier and Type | Method and Description |
---|---|
static SecretKey |
generate(org.bouncycastle.crypto.BlockCipher cipher)
Generates a symmetric encryption key whose size is equal to the cipher block size.
|
static SecretKey |
generate(int bitLength,
org.bouncycastle.crypto.BlockCipher cipher)
Generates a symmetric encryption key of the given length.
|
static SecretKey |
generate(int bitLength,
org.bouncycastle.crypto.BlockCipher cipher,
SecureRandom random)
Generates a symmetric encryption key of the given length.
|
public static SecretKey generate(org.bouncycastle.crypto.BlockCipher cipher)
cipher
- Cipher with key will be used.public static SecretKey generate(int bitLength, org.bouncycastle.crypto.BlockCipher cipher)
bitLength
- Desired key length in bits.cipher
- Cipher with key will be used.public static SecretKey generate(int bitLength, org.bouncycastle.crypto.BlockCipher cipher, SecureRandom random)
bitLength
- Desired key length in bits.cipher
- Cipher with key will be used.random
- Randomness provider for key generation.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.