Leigh, Wil, and Pete: to follow up. This code seems to be working very well
to encrypt a credit card number:
<!--- set default value for variable 'result' in case no value is entered
for CreditCardNumber --->
<cfparam name="result" default="">
<!--- generate a key suitable for "AES" --->
<cfset theKey = GenerateSecretKey("AES", 256)>
<!--- now do the actual encryption using the "AES" algorithm --->
<cfset result = encrypt(form.CreditCardNumber, theKey, "AES", "UU")>
<!--- update statement --->
CreditCardNumber = <cfqueryparam cfsqltype="cf_sql_varchar"
value="#result#">,
I will use the same logic to create the decrypt statement.
Thank you, again. Have a good evening.
Eric
-----Original Message-----
From: Leigh [mailto:[email protected]]
Sent: Friday, November 09, 2012 1:37 PM
To: cf-talk
Subject: RE: encrypt / decrypt question
My response got cut off.. Here is the full snippet... assuming it goes
through ;-)
http://pastebin.com/fPLcU3Kd
-Leigh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353127
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm