I am playing around with encrypt and decrypt in CF and I ran into a issue.
First, here is the code:

<cfoutput>
<cfset key = "XXXXX44po">

<cfset tt = "4000000000000003">

<cfset encryptCC = '#trim(encrypt(trim(tt), key))#'> 
<P>#tt#</P>

<P>#encryptCC# </P>
<cfset ccnumber = "#trim(decrypt(trim(encryptCC), key))#"> 

<P>#ccnumber#  </P>
</cfoutput>

When I run this, the decrypt is 4000000000000002.  If I change the number to
be encrypted, sometimes it decrypts correctly and sometimes it does not.

The same is true if I change the key.

Any ideas?

Thanks
Jacob


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
CF 8 – Scorpio beta now available, 
easily build great internet experiences – Try it now on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284138
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to