On Mon, Mar 15, 2010 at 6:30 PM, megan cytron wrote:
...
> <cfset encoding = "hex">
> <cfset iv=BinaryDecode("00000000000000000000000000000000", "Hex")>
> <cfset key = ToBase64(BinaryDecode("SECRETKEYHERE", "Hex"))>
> <cfset algorithm = "AES/CBC/NoPadding">
> <cfset str =1234567891234567>
> <cfset enc = Encrypt(str, key, algorithm, encoding,iv)>
>
> My result--> 1DF20DDA4A5C45DCD2BCDB191D08559C
Heh. I remember asking about the hex. I guess I always look for
letters when I'm looking for hex values. 7FFFFFFF "looks" hex.
Pretty silly, I be.
Anyways, using the java stuff might be easiest. I happen to have some
java stuff hanging 'round. It's for a Railo built-in tag, untested on
ACF, but in principle...
Works something like this:
var crypto = createObject("component","crypto");
var key = crypto.generateKey("AES");
var iv = BinaryDecode("00000000000000000000000000000000", "Hex");
var encrypted = crypto.encrypt("1234567891234567",
key,
"AES/CBC/NoPadding",
"hex",iv);
debug(encrypted);
var decrypted = crypto.decrypt(encrypted,
key,
"AES/CBC/NoPadding",
"hex",iv);
debug(toString(decrypted));
assertEquals("1234567891234567",toString(decrypted));
I dunno if it's enough to just magically work for you, but maybe it
contains some stuff that'll help you along the your path.
http://cfml.pastebin.com/utuEm08w
I guess we could try seeing if a shared secret key gets us the same
results, that might be fun. Not the key they gave you, just one we
make up and share. I'm down if you are!
:DeN*
--
Amid the pressure of great events, a general principle gives no help.
Georg Wilhelm Friedrich Hegel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331780
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm