ophio / secure-preferences

Android secure shared preferences using Android Keystore system
https://medium.com/@vashisthg/android-secure-shared-preferences-10f8356a4c2b
Apache License 2.0
348 stars 56 forks source link

Exception in Application Class while Starting the Application #27

Open Gaetano-Dati opened 6 years ago

Gaetano-Dati commented 6 years ago

20 mar 12:46 sulla versione dell'app 27 Huawei P8 Lite (hwALE-H), 2048MB RAM, Android 6.0 Rapporto 1 di 1 java.lang.RuntimeException: at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4843) at android.app.ActivityThread.access$1600 (ActivityThread.java:168) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1440) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:150) at android.app.ActivityThread.main (ActivityThread.java:5659) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:822) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:712) Caused by: java.lang.IllegalStateException: at in.co.ophio.secure.core.KeyStoreKeyGenerator. (KeyStoreKeyGenerator.java:51) at in.co.ophio.secure.core.KeyStoreKeyGenerator.get (KeyStoreKeyGenerator.java:56) at com.bananasrl.banana.Utils.App.onCreate (App.java:107) at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1015) at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4834) Caused by: java.security.InvalidKeyException: at android.security.KeyStore.getInvalidKeyException (KeyStore.java:700) at android.security.KeyStore.getInvalidKeyException (KeyStore.java:720) at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit (KeyStoreCryptoOperationUtils.java:53) at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit (KeyStoreCryptoOperationUtils.java:89) at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized (AndroidKeyStoreCipherSpiBase.java:263) at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit (AndroidKeyStoreCipherSpiBase.java:108) at javax.crypto.Cipher.tryTransformWithProvider (Cipher.java:615) at javax.crypto.Cipher.tryCombinations (Cipher.java:535) at javax.crypto.Cipher.getSpi (Cipher.java:440) at javax.crypto.Cipher.init (Cipher.java:818) at javax.crypto.Cipher.init (Cipher.java:777) at in.co.ophio.secure.vault.SecretKeyWrapper.unwrap (SecretKeyWrapper.java:111) at in.co.ophio.secure.core.KeyStoreKeyGenerator.loadOrGenerateKeys (KeyStoreKeyGenerator.java:78) at in.co.ophio.secure.core.KeyStoreKeyGenerator. (KeyStoreKeyGenerator.java:46) Caused by: android.security.KeyStoreException: at android.security.KeyStore.getKeyStoreException (KeyStore.java:640)

How to achieve this problem?

Thank you