I ran into a problem after all. I'm trying to interface with AspEncrypt, a
third-party app that gives ASP encryption capabilities. Has anyone had any
success exchanging encrypted data with AspEncrypt? I'm running into strange
issues. To summarize:
I'm using a simple hash command to generate a RC2-compatible key: hash("key",
"SHA"). <cfoutput>#hash("key", "SHA")#</cfoutput> generates
"A62F2225BF70BFACCBC7F1EF2A397836717377DE", but this key is incompatible with
AspEncrypt:
Set CM = Server.CreateObject("Persits.CryptoManager")
Set Context = CM.OpenContext("container", True)
Set Blob = CM.CreateBlob
Blob.Hex = "A62F2225BF70BFACCBC7F1EF2A397836717377DE"
Set Key = Context.ImportRawKey(Blob, calgRC2)
Set Blob = Key.EncryptText("testing123")
strEnc = Blob.Base64
This gives a "bad block" error.
The ImportRawKey method is supposed to take the key as is, with no further
translation or hashing, so this should work, but it doesn't. Any ideas?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256193
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4