-
Notifications
You must be signed in to change notification settings - Fork 13
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
Exception casting to RSAPublicKey #4
Comments
I'm getting this error after generating a signed APK and trying to encrypt a string. However, it works fine while debugging with Android Studio.
Unfortunately my crypto and Java knowledge is too weak to figure out the cause. I'm using your fork along with the patch from #1. |
@nmalcolm are you getting that error with my pull request (my fork) and a signed apk? Try https://github.com/andy9775/Qlassified-Android/tree/jitpack as it should be the most up to date version. To use it as a jitpack dependency check out https://jitpack.io/docs/ANDROID/#installing |
Yep, I'm using that already. Doesn't crash while encrypting, only discovered it by generating a signed APK, installing it manually, and checking the Android Studio log. Had others reproduce the issue too. |
@nmalcolm I created a signed APK of the example project provided in the library using the This is running on genymotion with android 6.0 as well as a galaxy s7 with 6.0.1 |
@nmalcolm Are you still having this issue with version 0.1.1? The |
@ShaPOC I am indeed. I'm baffled a signed APK doesn't work. Debugging works perfectly. Let me know if there's anything you need. |
检测到:中文 » 英语 |
Im having this same issue when i turn minifyEnabled TRUE Could not encrypt this string. Stacktrace: java.security.NoSuchAlgorithmException: Provider SC does not provide RSA/NONE/PKCS1Padding Any ideas why? |
You can look at this.Compatible with 8.0:https://github.com/zhibuyu/KeyStoreEncryDemo |
When running on API 23 there seems to be an issue with RSAPublicKey. Possible cause: http://stackoverflow.com/questions/32400689/crash-casting-androidkeystorersaprivatekey-to-rsaprivatekey
More info:
the exception is,
java.lang.ClassCastException: android.security.keystore.AndroidKeyStoreECPublicKey cannot be cast to java.security.interfaces.RSAPublicKey
This happens inside this code block
In the QlassifiedKeyStore.encrypt method.
I have the code running on both an emulator with 6.0 and a device with 6.0.1.
The text was updated successfully, but these errors were encountered: