hi,
to use Java's Decryption and Encryption functions, I need a way to de-
and encode Strings using Base64. It's a restlet- based project, so I
think it is okay to use restlet's Base64- class (there is one in SUN-
JDK itself, but it is in an internal sun- package, so it will not exists
in other JDK- implementations as OpenJDK e.g. ).
I just do:
byte[] bytes=Base64.decode(secret);
with secret as a String. It works all fine, but when I moved from
Windows Vista to Linux Ubuntu, there was an ArrayIndexOutOfBoundsException:
java.lang.ArrayIndexOutOfBoundsException: 11
at org.restlet.engine.util.Base64.decode(Base64.java:115)
at org.restlet.engine.util.Base64.decode(Base64.java:163)
at com.chancenwerk.util.CryptHelper.decrypt(CryptHelper.java:37)
... 37 more
That line 37 in CryptHelper is just:
byte[] bytes=Base64.decode(secret);
Are there any ideas what's going wrong here?
Thanks,
Alex
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2646456