Which encryption method are you using? The stronger ones require that you also install the Java Cryptography Extension.
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html Wil Genovese Sr. Web Application Developer/ Systems Administrator CF Webtools www.cfwebtools.com wilg...@trunkful.com www.trunkful.com On Nov 4, 2012, at 7:32 PM, "Eric Bourland" <e...@ebwebwork.com> wrote: > > Greetings. I have what is probably a very basic question, about which I have > done a lot of reading - I still need some help. > > > > I am trying to use the encrypt function to encrypt a credit card number. > > > > I am placing the key as a variable in application.cfc, thus: > > > > <cfset request.encryptionKey = "128-bit character string"> > > > > To encrypt the credit card number, I use this line in my insert statement: > > > > CreditCardNumber = <cfqueryparam cfsqltype="cf_sql_varchar" > value="#encrypt(form.CreditCardNumber,request.encryptionkey,"AES")#">, > > > > ColdFusion returns this error: An error occurred while trying to encrypt or > decrypt your input string: '' Can not decode string "(encryption key)".. > > > > How would you handle this? I simply want to: > > > > 1) Encrypt the credit card number that is placed in the database - so > that even if someone compromises the database, the data is encrypted > > 2) Decrypt the credit card number when it is displayed on a secure > administration page > > > > Should I not place the 128-bit key in application.cfc - but instead use the > generatesecretkey function? > > > > Thank you for any advice. > > > Eric > > > > ******* > > Eric Bourland > > Internet Project Development > > Washington DC > > email: <mailto:e...@ebwebwork.com> e...@ebwebwork.com > > web: ebwebwork.com > > mobile: 202-390-0185 > > fax: 202-315-5809 > > Skype: ericbourland1968 > > Yahoo IM: eab_68 > > AOL IM: ebwebwork > > ICQ IM: 23780065 > > MSN IM: ebwebwork > > Google IM: ebwebwork > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:353051 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm