src/main/java/io/github/sleroy/aes/Encryption.java
/**
	 * Decrypt a base-64 encrypted text toa plain text,
	 * 
	 * @param the
	 *            Base64 encrypted text
	 * @return plainText the plain text
	 */
Decrypt a base-64 encrypted text toa plain text.

@param the
Base64 encrypted text
@return plainText the plain text
Decrypt a base - 64 encrypted text toa plain text . @param the Base64 encrypted text @return plainText the plain text
public String decrypt(String encryptedText) {
		try {
			Cipher cipher = Cipher.getInstance(CIPHER_ALGO);
			SecretKey secretKey = new SecretKeySpec(encodingKey, CIPHER_ALGO_NAME);
			cipher.init(Cipher.DECRYPT_MODE, secretKey);
			byte[] cipherText = Base64.getDecoder().decode(encryptedText.getBytes(DEFAULT_ENCODING));
			String decryptedString = new String(cipher.doFinal(cipherText), DEFAULT_ENCODING);
			return decryptedString;
		} catch (Exception e) {
			LOGGER.error("Could not decrypt a encodingKey for the reason {}", e.getMessage(), e);
		}
		return null;
	}
public String decrypt ( String encryptedText ) { try { Cipher cipher = Cipher . getInstance ( CIPHER_ALGO ) ; SecretKey secretKey = new SecretKeySpec ( encodingKey , CIPHER_ALGO_NAME ) ; cipher . init ( Cipher . DECRYPT_MODE , secretKey ) ; byte [ ] cipherText = Base64 . getDecoder ( ) . decode ( encryptedText . getBytes ( DEFAULT_ENCODING ) ) ; String decryptedString = new String ( cipher . doFinal ( cipherText ) , DEFAULT_ENCODING ) ; return decryptedString ; } catch ( Exception e ) { LOGGER . error ( "Could not decrypt a encodingKey for the reason {}" , e . getMessage ( ) , e ) ; } return null ; }
Decrypt a base-64 encrypted text toa plain text,
Decrypt a base - 64 encrypted text toa plain text