The value is validated strictly integer before it's encrypted. It's the encrypt() function that's generating the double quote.
Can you explain the "convert it to base 64 so it's db safe" idea? -----Original Message----- From: Matt Robertson [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 3:37 PM To: CF-Talk Subject: Re: Encrypt/Decrypt 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

