pradeep1991singh / react-native-secure-key-store

React Native Library for securely storing keys to iOS KeyChain and Android KeyStore.
ISC License
238 stars 69 forks source link

Use encrypted shared preferences from androidx.security #86

Closed tombailey closed 4 years ago

tombailey commented 4 years ago

This PR uses the EncryptedSharedPreferences class from the AndroidX Security Crypto library.

Pros:

Cons:

It seems the Alpha Release versions of AndroidX Security are min sdk 21 (Android 5.0)

I am not sure how you want to handle the min sdk change as it might require some apps that target older devices and use this library to stick with an older version. Perhaps it is worth waiting for Google to promote its 1.1.0-alpha to a release candidate. That should allow us to use min sdk 21 (Android 5.0) but still might be a problem for some apps.

tombailey commented 4 years ago

Hopefully, this will also address lots of the issues various people have seen with the keystore on different devices/Android versions

tombailey commented 4 years ago

Also, it is worth mentioning that because Android will use EncryptedSharedPreferences after this is merged, when developers push an update to their existing app, all previous data will be lost/ignored