encrypt: Only one line of code: It works with Rail, but not with my Lucee installation.

76 views
Skip to first unread message

Joern Krueger

unread,
Oct 22, 2015, 9:26:29 AM10/22/15
to Lucee
Hi,
i want to migrate from railo to lucee. I have set up a new server. It works, but decrypt/encrypt doesn't work.

Following line works fine with railo, but not with lucee (4.5)
<cfset TEST = encrypt("DE12500105170648489890", "121212324624812323457", "AES", "HEX")>

WHY? 

Thanks for your help
Joern

Andrew Dixon

unread,
Oct 22, 2015, 9:55:15 AM10/22/15
to lu...@googlegroups.com
Hi Joern,

Using your code I get the same error on Lucee 4.5.1.023 and Railo 4.2.1.000 which is:

Invalid AES key length: 15 bytes

Which version of Railo did you upgrade from?

Kind regards,

Andrew

--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/f4cb9859-435c-4422-9fa7-87321794a3cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joern Krueger

unread,
Oct 22, 2015, 10:08:59 AM10/22/15
to Lucee
It still works on the Railo-Server: Railo 3.3.1.000 final
I can't migrate until this problem is solved...
On Lucee, i get following error: can't decode the base64 input string [121212324624812323457], because the input string has an invalid length

Andrew Dixon

unread,
Oct 22, 2015, 11:20:51 AM10/22/15
to lu...@googlegroups.com
I would assume there must have been a behaviour change between Railo 3 and 4 then. Also it could be related to the version of Java you are using on each. I assume that one Railo 3 you are using a much older of Java, maybe Java 6 (1.6).

Kind regards,

Andrew

Andrew Dixon

unread,
Oct 22, 2015, 11:35:17 AM10/22/15
to lu...@googlegroups.com
Looks like your "key" is not valid. I found a testcase for an Railo encrypt ticket (https://issues.jboss.org/browse/RAILO-2503) and the key is a different length. If I use the key in that key (40yhfexqTxUbEdrNY0SJxQ==) instead of your key (121212324624812323457) and it works without erroring. Are you 100% sure that is the right key?

Kind regards,

Andrew

Joern Krueger

unread,
Oct 23, 2015, 2:39:57 AM10/23/15
to Lucee
Yes, i am 100% sure. The Railo server is still running.
But thanks for your help:
My planned workaround: I decrypt everything on railo, then i encrypt everything with a key that works with railo and lucee...

Joern
Reply all
Reply to author
Forward
0 new messages