public final class UtilsAESCipher
extends java.lang.Object
Class to decode and encode password using AES algorithm.
Project:Platform for detection and validation of certificates recognized in European TSL.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decryptMessage(java.lang.String msg)
Method that decrypts a message.
|
byte[] |
encryptMessage(java.lang.String msg)
Method that encrypts a message.
|
static UtilsAESCipher |
forceReloadInstance()
Method that forces to reload the instance of the class.
|
static UtilsAESCipher |
getInstance()
Method that obtains an instance of the class.
|
static boolean |
testCipher(java.lang.String newAES)
Method that checks a new key.
|
public static UtilsAESCipher getInstance()
public static UtilsAESCipher forceReloadInstance()
public static boolean testCipher(java.lang.String newAES)
newAES - The new key.true if the key is valid, otherwise false.CipherException - If the method fails.public byte[] encryptMessage(java.lang.String msg)
throws CipherException
msg - The message to encrypt.CipherException - If the method fails.public byte[] decryptMessage(java.lang.String msg)
throws CipherException
msg - The message to decrypt in base 64.CipherException - If the method fails.