Questions tagged [androidx-security]

4 questions
8
votes
0 answers

EncryptedSharedPreferences result in UnrecoverableKeyException

I'm using the new EncryptedSharedPreferences class in a way recommended from Google: private fun securePrefs(context: Context): SharedPreferences { val fileName = "sharedPrefsSecure" val masterKeyAlias =…
frangulyan
  • 3,580
  • 4
  • 36
  • 64
4
votes
1 answer

Proper usage of EncryptedSharedPreferences

Android recently released EncryptedSharedPreferences which automatically encrypts SharedPreferences key/value data. While this is good, I've found that I can simply hook onto the API call and retrieve the decrypted value. Other than encrypting the…
user1118764
  • 9,255
  • 18
  • 61
  • 113
2
votes
0 answers

How to handle KeyStoreException caused by creation of EncryptedSharedPreferences?

For the most part, the application works fine. At times I get the following exception: android.security.KeyStoreException: Invalid operation handle Here is the stack trace: android.security.KeyStore.getKeyStoreException…
Xid
  • 4,578
  • 2
  • 13
  • 35
1
vote
1 answer

android security crypto: java.lang.NoSuchMethodError: No static method aes256SivTemplate()

When using androidx.security:security-crypto:1.0.0-rc01 The app runs fine, when using the new androidx.security:security-crypto:1.0.0-rc02 I get the following E/AndroidRuntime: FATAL EXCEPTION: main Process: com.app.appm, PID: 12145 …
Amos
  • 415
  • 1
  • 4
  • 10