public class AES extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.bouncycastle.crypto.engines.AESEngine |
createCipher(SecretKey secretKey,
boolean forEncryption)
Creates a new AES cipher.
|
static KeyGenerator |
createKeyGenerator()
Returns a new AES key generator instance.
|
static SecretKey |
generateKey(int keyBitLength,
SecureRandom random)
Generates an AES key of the specified length.
|
public static KeyGenerator createKeyGenerator()
RuntimeException - If an AES key generator couldn't be instantiated.public static SecretKey generateKey(int keyBitLength, SecureRandom random)
keyBitLength - The key length, in bits.RuntimeException - If an AES key couldn't be generated.public static org.bouncycastle.crypto.engines.AESEngine createCipher(SecretKey secretKey, boolean forEncryption)
secretKey - The AES key. Must not be null.forEncryption - If true creates an AES encryption cipher, else creates an AES decryption cipher.Copyright © 2015. All rights reserved.