public class AES extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
log |
static String |
logname |
Constructor and Description |
---|
AES() |
Modifier and Type | Method and Description |
---|---|
static String |
Decrypt(String cipher,
String key)
Decrypts a password or other sensitive data If the parameter is null
or empty, an empty string is returned.
|
static String |
Encrypt(String clear,
String key)
encrypts a password using AES Requires the Unlimited Strength Crypto
Extensions
|
static String |
GEN()
Generate a new AES 256 bit encryption key.
|
static String |
GEN(int keysize)
generates an AES based off of the selected key size
|
static boolean |
ValidateKey(String key)
return true is the supplied key is a valid aes key
|
public static final String logname
public static final org.apache.commons.logging.Log log
public static String GEN(int keysize)
keysize
- public static String GEN()
public static boolean ValidateKey(String key)
key
- public static String Encrypt(String clear, String key) throws Exception
clear
- key
- Exception
public static String Decrypt(String cipher, String key)
cipher
- encrypted textkey
- Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.