You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to encrypt data with AES and getting ClassCast. Example: RxFingerprint.encrypt(EncryptionMethod.AES, getActivity(),mKeyName, data)
java.lang.ClassCastException: android.security.keystore.AndroidKeyStoreRSAPrivateKey cannot be cast to javax.crypto.SecretKey
at com.mtramin.rxfingerprint.AesCipherProvider.getKey(AesCipherProvider.java:60)
at com.mtramin.rxfingerprint.AesCipherProvider.findOrCreateKey(AesCipherProvider.java:54)
at com.mtramin.rxfingerprint.AesCipherProvider.cipherForEncryption(AesCipherProvider.java:75)
at com.mtramin.rxfingerprint.CipherProvider.getCipherForEncryption(CipherProvider.java:84)
at com.mtramin.rxfingerprint.AesEncryptionObservable.initCryptoObject(AesEncryptionObservable.java:83)
at com.mtramin.rxfingerprint.FingerprintObservable.subscribe(FingerprintObservable.java:70)
at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
at io.reactivex.Observable.subscribe(Observable.java:11194)
at io.reactivex.Observable.subscribe(Observable.java:11180)
at io.reactivex.Observable.subscribe(Observable.java:11109)
at com.org.android.monitor.test.LoginFragment.storeAndLogin(LoginFragment.java:140)
at com.org.android.monitor.test.LoginFragment.access$000(LoginFragment.java:34)
at com.org.android.monitor.test.LoginFragment$1.lambda$onResponse$2$LoginFragment$1(LoginFragment.java:203)
at com.org.android.monitor.test.LoginFragment$1$$Lambda$1.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6337)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
The text was updated successfully, but these errors were encountered:
I'm trying to encrypt data with AES and getting ClassCast. Example:
RxFingerprint.encrypt(EncryptionMethod.AES, getActivity(),mKeyName, data)
java.lang.ClassCastException: android.security.keystore.AndroidKeyStoreRSAPrivateKey cannot be cast to javax.crypto.SecretKey
at com.mtramin.rxfingerprint.AesCipherProvider.getKey(AesCipherProvider.java:60)
at com.mtramin.rxfingerprint.AesCipherProvider.findOrCreateKey(AesCipherProvider.java:54)
at com.mtramin.rxfingerprint.AesCipherProvider.cipherForEncryption(AesCipherProvider.java:75)
at com.mtramin.rxfingerprint.CipherProvider.getCipherForEncryption(CipherProvider.java:84)
at com.mtramin.rxfingerprint.AesEncryptionObservable.initCryptoObject(AesEncryptionObservable.java:83)
at com.mtramin.rxfingerprint.FingerprintObservable.subscribe(FingerprintObservable.java:70)
at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
at io.reactivex.Observable.subscribe(Observable.java:11194)
at io.reactivex.Observable.subscribe(Observable.java:11180)
at io.reactivex.Observable.subscribe(Observable.java:11109)
at com.org.android.monitor.test.LoginFragment.storeAndLogin(LoginFragment.java:140)
at com.org.android.monitor.test.LoginFragment.access$000(LoginFragment.java:34)
at com.org.android.monitor.test.LoginFragment$1.lambda$onResponse$2$LoginFragment$1(LoginFragment.java:203)
at com.org.android.monitor.test.LoginFragment$1$$Lambda$1.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6337)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
The text was updated successfully, but these errors were encountered: