adorsys / secure-storage-android

Store strings & credentials securely encrypted on your device
Apache License 2.0
367 stars 58 forks source link

Android 12 - SecurePreferences.setValue throws an exception #96

Open dark-returnal opened 3 years ago

dark-returnal commented 3 years ago

I am getting the below error while i am running my android app on the new Beta of Android 12. I use the version de.adorsys.android:securestoragelibrary:1.2.4

java.lang.IllegalArgumentException: Bad arguments javax.crypto.Cipher.doFinal(Cipher.java:2109) android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:582) javax.crypto.Cipher.doFinal(Cipher.java:1938) javax.crypto.CipherOutputStream.close(CipherOutputStream.java:210) de.adorsys.android.securestoragelibrary.KeystoreTool.encryptMessage(KeystoreTool.java:88) de.adorsys.android.securestoragelibrary.SecurePreferences.setValue(SecurePreferences.java:59)

mhelder commented 3 years ago

I ran into the same issue and opened an issue with Google: https://issuetracker.google.com/issues/191532879

After updating to the Android S Beta 2 build, the issue seems resolved.