Decrypts encrypted binary data with the specified key, value, algorithm, salt, and iterations.
decryptBinary(binaryData, key [, algorithm [, encoding] [, iv | salt [, iterations]]])
→ returns binary
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.
Decrypts binary data that was encrypted with encryptBinary, using the same key and algorithm.
key = generateSecretKey( "AES" );
data = charsetDecode( "Hello World", "utf-8" );
encrypted = encryptBinary( data, key, "AES" );
decrypted = decryptBinary( encrypted, key, "AES" );
writeOutput( charsetEncode( decrypted, "utf-8" ) );
Expected Result: Hello World
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.