Try escaping the string before encrypting it. Then maybe convert it to base 64 so its db-safe.
I'm pretty sure if you try to do this in one step it'll throw an error. I used something very similar to this for strings I had to be able to store and email to people. <cfset variables.urlsafe = URLEncodedFormat(variables.myvar)> <cfset variables.base64encrypted = ToBase64(encrypt(variables.urlsafe,variables.yourkeyhere))> ------------------------------------------- Matt Robertson, [EMAIL PROTECTED] MSB Designs, Inc. http://mysecretbase.com ------------------------------------------- ---------- Original Message ---------------------------------- From: "Greg Luce" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Tue, 27 May 2003 16:02:02 -0400 >I encrypted a value to store in the db using the CF encrypt() function. >It worked a few times, but then it encrypted a value with a double quote >as one of the encrypted chars. Now when I try to decrypt() the value I >get an error that the value to be decrypted is not valid. > ><cfset y = decrypt(get_stuff.value,"#request.rag#")> > >I tried htmlcodeformat() because it escapes double quotes. But it still >errors: > ><cfset y = decrypt(htmlcodeformat(get_client.ccnumber),"#request.rag#")> > >Ideas? > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

