Created
November 18, 2022 19:26
-
-
Save trycf/26d79cd1023407e2c904cde600ee1562 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
q = queryNew( "pw","varchar" , | |
[ | |
{ pw: "Password test 1" }, | |
{ pw: "Password test 2" }, | |
{ pw: "Test Password 8" }, | |
{ pw: "Pwd again 9" } | |
] | |
); | |
loop query="q"{ | |
key = generateSecretKey('AES'); | |
echo("Encrypted with ::>[ #key# ] - ") | |
enc = encrypt(pw, key, 'AES') | |
echo(enc & "<br><br>") | |
dec = decrypt(enc, key, 'AES') | |
echo("Decrypted with ::>[ #key# ] - #dec#<hr>") | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment