encryptedsharedpreferences-example
encryptedsharedpreferences-example copied to clipboard
Example app for androidx.security.crypto.EncryptedSharedPreferences
Seems MasterKeys.getOrCreate is deprecated. It says to use MasterKey.Builder instead. Can you please update it? Also, I think the minimal API for androidx.security:security-crypto:1.1.0-alpha02, is now 21.
Fatal Exception: java.lang.SecurityException: Could not decrypt key. decryption failed at b.r.a.a.a(EncryptedSharedPreferences.java:22) at b.r.a.a.getAll(EncryptedSharedPreferences.java:4) at b.r.a.a$b.commit(EncryptedSharedPreferences.java:2) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6816) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1565) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1453)