> I've done encryption before, and have been able to successfully send
> the encrypted data to third parties for decryption; but I've never been
> on the other side of the transfer, and the initialization vector has me
> especially confused.
> 

Using CF's Decrypt(encrypted_string, key[, algorithm, encoding, IVorSalt,
iterations])

You should be able to do something like this...

Note, this is off the top of my head for TripleDES and I've not tested it in
the slightest. The only thing that really concerns me though is the chr(0)
in the middle of the StringBuffer append sequence. You may have to
experiment with how you build that ByteArray.

sb = createObject("java", "java.lang.StringBuffer");
sb.append(chr(27));
sb.append(chr(9));
sb.append(chr(45));
sb.append(chr(27));
sb.append(chr(0));
sb.append(chr(72));
sb.append(chr(171));
sb.append(chr(54));

IVector = sb.toString().getBytes();  // convert the StringBuffer to a
ByteArray

outputString = Decrypt(inputString, Hash(Key, "MD5"), "DESEDE", "Base64",
IVector);

Paul



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357033
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to