Decrypts a string that is encrypted with the Encrypt function.
decrypt(string, key [, algorithm [, encoding] [, iv | salt [, iterations]]])
→ returns string
CFMX_COMPAT algorithm, any combination of any number of characters; used as a seed used to generate a 32-bit encryption key.GenerateSecretKey function to generate the key.
CFMX_COMPATencrypt function for additional algorithms.CFMX_COMPATAESBLOWFISHDESDESEDEDESXRC2RC4RC5PBEAES/GCM/NoPaddingUUalgorithm parameter.
UUBase64HexSALT.algorithm parameter.
IV.algorithm parameter.
0algorithm parameter with a Password Based Encryption (PBE) algorithm.salt parameter. Do not specify this parameter for Block Encryption Algorithms.iv or salt named parameters.
IVorSalt parameter or aliases of iv and salt.
Generate an AES 128 bit key and then use it to encrypt and decrypt a secret.
ex={};
ex.key = generateSecretKey("AES");
ex.secret = "top secret";
ex.encrypted=encrypt(ex.secret, ex.key, "AES", "Base64");
ex.decrypted=decrypt(ex.encrypted, ex.key, "AES", "Base64");
writeDump(ex);
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.