Skip to content

Instantly share code, notes, and snippets.

@ddspringle
Created December 17, 2014 15:01
Show Gist options
  • Save ddspringle/7a4b60e506e7ebb085ce to your computer and use it in GitHub Desktop.
Save ddspringle/7a4b60e506e7ebb085ce to your computer and use it in GitHub Desktop.
ColdFusion Web Application Security - Part Five - Encryption - Code Sample 1
<cfset myPlainText = "This is a block of text we will encrypt" />
<cfset myKey = "VpugAocKZVP8BZfamx96Yw==" />
<cfset myCipherText = Encrypt(myPlainText,myKey,'AES/CBC/PKCS5Padding','HEX') />
<cfoutput>#myCipherText#</cfoutput>
<cfscript>
myPlainText = "This is a block of text we will encrypt";
myKey = "VpugAocKZVP8BZfamx96Yw==";
myCipherText = Encrypt(myPlainText,myKey,'AES/CBC/PKCS5Padding','HEX');
writeOutput( myCipherText );
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment