Hi - This might not be the best place to ask, but if someone can point me in the right direction, that would be great. I need to use an RC4 encryption/decryption function. Instead of writing one, I am trying to use the RC4 function from the security section of CFLib - http://www.cflib.org/codeView.cfm?ID=1018
This code looks right to me - I've analyzed it and compared it to the ASP code from which it was converted - http://www.4guysfromrolla.com/webtech/code/rc4.inc.html and all looks right. 99% of the time, the RC4 encryption/decryption works in the CF function. But certain combinations of letters seem to cause decryption failure, but the same decryption works fine in the ASP test code. http://www.4guysfromrolla.com/demos/rc4test.htm try this... ---------- <cfset ToEncrypt = "ZACHROCKSANDYOUDONTSOTAKETHAT"> <cfset MyKey = "password"> <cfset EncryptedValue = RC4(MyKey,ToEncrypt)> <cfset DecryptedValue = RC4(MyKey,EncryptedValue)> <cfoutput>#DecryptedValue#</cfoutput> ------ My output from the above ends up having junk on the end of the decrypted value: ZACHROCKSANDYOUDONTSÂìl6j?ʯ In the ASP code, the decryption comes out fine though. Doing a hex dump of the encrypted value comes out identical to the ASP code as well. I was wondering if anyone else has experienced this issue and resolved it? The author isn't replaying to questions regarding the function. Thanks for any help. MikeG ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224597 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

