I’ve put together what I believe is the Java equivalent of CF’s GenerateSecretKey, Encrypt, and Decrypt functions. Unfortunately these encrypt and decrypt functions still do not work in CF7 so there must be something else besides the US_export_policy.jar & local_policy.jar files that would need to be upgraded in order to allow for strong encryption to work in CF7.
I’ve posted the code below in hopes that someone will tell me I’ve made a mistake and that we could get this to work in CF7.
The code is based on this article from Sun.
UPDATE: Per Jason Dean’s comment: for this to work in CF7 you need to use a different library. The strong encryption library for CF7 can be downloaded here.
See my note on the original article. I tested similar code on CF7 and I was able to get it working.
http://www.danielgaspar.com/blog/2011/01/coldfusion-strong-encryption-256bit-and-higher/comment-page-1/#comment-291