Check out our Angular Book Series.

ASCrypt3 Rijndael Update

I made an update to Rijndael encryption in ASCrypt. There was a problem initializing the object if you were using a blocksize or key length other than the default.

It should be working better now. Of course, I still can't get it to produce the same results as ColdFusion's Encrypt function.

I did do some research into how CF's encrypt function is implemented. It uses FIPS-197. Read the Boringly long spec. In the FIPS implementation, the block size is constant at 128 bits.

Using the same key and source string (and Block Size), I would expect two different implementations of the same encryption algorithm to produce the same encrypted string. Most likely there is a bug with the ASCrypt implementation.

Last Saturday it was 60 degrees. Today we have a dusting of snow and flurries continuing to come down. I love New England.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
toku's Gravatar So, do any of the encryption methods work with coldfusion at all? I'm trying to encrypt an XML file for Flex to read (and decrypt). If not with ASCrypt3, can you think of any other way to do it?

# Posted By toku | 2/2/07 1:53 PM
Jeffry Houser's Gravatar Toku,

MD5 and SHA1 encryption appears to produce similar results.
Base64 encoding works identically in both cases.

I could not get Rijndael (AKA AES) encryption to work. I've spent a lot of time on it without any luck. Based on my searching I couldn't get two AES encryption methods to return the same results.

I'd love some help if you want to take a look at the code.
# Posted By Jeffry Houser | 2/2/07 3:01 PM
toku's Gravatar Thanks for the reply, I'll take a look..see if I can find something. :-D

Both MD5 and SHA1 are hash functions that can't be decrypted. So they are not what I am looking for.
# Posted By toku | 2/4/07 3:15 AM
Dave Cozens's Gravatar I spent ages getting AES to work. I blogged the details to save you the effort...
# Posted By Dave Cozens | 7/4/07 3:43 AM
Jeffry Housr's Gravatar Dave,

I don't see any posts there about AES and Flex + ColdFusion. Are you referring to this post?

That said, I have heard from people who used ASCrypt3 AES to pass data back and forth between Java and Flex.

I was able to get AES working between CF and Flex using a different encryption package. ( ).
# Posted By Jeffry Housr | 7/4/07 7:41 AM
All Content Copyright 2005, 2006, 2007, 2008, 2009 Jeffry Houser. May not be reused without permission
BlogCFC was created by Raymond Camden. This blog is running version