public abstract class AES extends Object
Constructor and Description |
---|
AES() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decrypt(byte[] cipherBytes,
SecretKey secretKey) |
static byte[] |
encrypt(byte[] plainBytes,
SecretKey secretKey) |
static SecretKey |
getSecretKey(String keyFile) |
public static SecretKey getSecretKey(String keyFile) throws IOException
IOException
public static byte[] encrypt(byte[] plainBytes, SecretKey secretKey) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException
public static byte[] decrypt(byte[] cipherBytes, SecretKey secretKey) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException