I am using encrypt and decrypt on my site. Encrypt works fine. When I decrypt I get the following error.
Lucee 5.0.0.254 Error (java.lang.ArrayIndexOutOfBoundsException)
Message 5
Cause java.lang.ArrayIndexOutOfBoundsException
Stacktrace The Error Occurred in
/home/jimsdailyawakenings/public_html/webdisplay.cfm: line 4
2: <cfset codetest = encrypt(thiscode, '123456')>
3: <cfoutput> #thiscode# - #codetest#</cfoutput>
4: <cfset codetest = decrypt( thiscode, '123456')>
5: <cfoutput> #thiscode# - #codetest#</cfoutput>
6: <cfabort>
Java Stacktrace lucee.runtime.exp.NativeException: 5
at lucee.runtime.coder.UUCoder.decodeChars(UUCoder.java:119)
at lucee.runtime.coder.UUCoder.decode(UUCoder.java:88)
at lucee.runtime.coder.Coder.decode(Coder.java:62)
at lucee.runtime.coder.Coder.decode(Coder.java:50)
at lucee.runtime.functions.other.Decrypt.invoke(Decrypt.java:74)
at lucee.runtime.functions.other.Decrypt.call(Decrypt.java:38)
at webdisplay_cfm$cf.call(/home/jimsdailyawakenings/public_html/webdisplay.cfm:4)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:863)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:808)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:803)
at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:62)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2250)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2242)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2210)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:848)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:103)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62).....
This is the code I have written…
<cfset thiscode = “works”>
<cfset codetest = encrypt(thiscode, ‘123456’)>
<cfoutput> #thiscode# - #codetest#</cfoutput>
<cfset codetest = decrypt( thiscode, ‘123456’)>
<cfoutput> #thiscode# - #codetest#</cfoutput>
Thank you