-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalArgumentException #3
Comments
Do you have a test case? |
I found out the reason while I'm testing. When the input is an empty String, the second entry after it will cause this error. Here is a test case, after encrypting the first empty String, encrypting "Jacob" does not have any problem, however encrypting "Sophia" will cause such Exception to be thrown. And the solution is to do an empty String test. I believe an empty String is not a valid input for the Crypter then. Thanks!
|
Not sure if it is Android specific, but testing on both 2.3.6 and 4.1.1 devices causes this Exception.
E/AndroidRuntime(10087): java.lang.IllegalArgumentException: Bad limit (capacity 57): 73
E/AndroidRuntime(10087): at java.nio.Buffer.limitImpl(Buffer.java:312)
E/AndroidRuntime(10087): at java.nio.Buffer.limit(Buffer.java:303)
E/AndroidRuntime(10087): at org.keyczar.Encrypter.encrypt(Encrypter.java:166)
E/AndroidRuntime(10087): at org.keyczar.Encrypter.encrypt(Encrypter.java:114)
E/AndroidRuntime(10087): at org.keyczar.Encrypter.encrypt(Encrypter.java:186)
The text was updated successfully, but these errors were encountered: