I'm using a simple encrypt statement to store info:

#Encrypt(SESSION.Customer.xxx, GetX.Item)#',

(this is from my INSERT statement) GetX.Item is the key loaded from a
table.

(I don't profess to be an expert in encryption (obviously) but, other
than being a little obtuse in the code, I don't know how to hide the key
any better on a server I don't control. I'm certainly open to
suggestion.)

Hiding the key aside, my decryption routine looks like (I'm moving it to
another table that is secure):

FieldX = '#Decrypt(FieldSaved, GetX.Item)#',


where aaa is the data retrieved from the table and GetX.Item is the same
key.

And it works, (e.g., decrypting 0&Z[ STK6_,;)*!I+!/  )until the
encrypted data looks like

3&JG$P5[0]<;!/QM#!O

So, I played with it a bit and it became obvious that the problem is the
# imbedded in the encrypted data.

What now? I can't escape it (##) because that throws an error, too.

To illustrate what seems to be happening:


<!--- this works --->
<cfset x=Encrypt("730072022000SerNum","7xxT533zrt3d9in")>
<cfoutput>
#x#   <!--- this will be: 2&:G&R4G5_,3++Q]#9:N+?)N4  --->
<br />#Decrypt(x,"7xxT533zrt3d9in")#

<!--- run routine then uncomment next line and run again --->
<!---<br />#Decrypt("2&:G&R4G5_,3++Q]#9:N+?)N4
","7xxT533zrt3d9in")#>--->
</cfoutput>


Larry Stephens
[EMAIL PROTECTED]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230634
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to