public class AES
extends java.lang.Object
Constructor and Description |
---|
AES() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decrypt(java.lang.String strToDecrypt)
returns decrypted value of an encrypted string with the password load
from the password file defined in the system properties
|
static java.lang.String |
decrypt(java.lang.String strToDecrypt,
java.lang.String password)
returns decrypted value of an encrypted string with the password or
null upon failure
|
static java.lang.String |
encrypt(java.lang.String strToEncrypt,
java.lang.String password)
returns a base64 encoded string of the encrypted result with the password
|
static java.lang.String |
getPassword(java.lang.String filename)
returns the password read from the file or null upon failure
|
static void |
main(java.lang.String[] args) |
public static java.lang.String encrypt(java.lang.String strToEncrypt, java.lang.String password) throws java.io.UnsupportedEncodingException, java.security.GeneralSecurityException
java.io.UnsupportedEncodingException
java.security.GeneralSecurityException
public static java.lang.String decrypt(java.lang.String strToDecrypt, java.lang.String password) throws java.io.UnsupportedEncodingException, java.security.GeneralSecurityException
java.io.UnsupportedEncodingException
java.security.GeneralSecurityException
public static java.lang.String decrypt(java.lang.String strToDecrypt) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException
public static java.lang.String getPassword(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)