oblador / react-native-keychain

:key: Keychain Access for React Native
MIT License
3.12k stars 515 forks source link

Inefficient way to store multiple key-value data on Android #589

Open pasquale95 opened 1 year ago

pasquale95 commented 1 year ago

Looking inside the library I see that a way to save multiple data is by providing a different alias in com.oblador.keychain.KeychainModule#setGenericPassword for any new username-password combination (code). However, every time a new alias is defined, a new key is generated through the KeyStore (code). This means that for the same application I will end up generating thousands of secrets in the KeyStore and store them inside the secure storage. This approach doesn't give any additional security. Moreover, it significantly slows down the app performances and it risks to exhaust the secure storage space. How do you handle the case of storing all the app data encrypted with your library? Why isn't there an API providing the possibility to store multiple username-password combinations using the same key?

BraveEvidence commented 1 year ago

This will help https://www.youtube.com/watch?v=J0OSn7s9YiA&list=PLQhQEGkwKZUrempLnmxjt7ZCZJu1W3p2i&index=15

BraveEvidence commented 1 year ago

Check this https://www.youtube.com/watch?v=rNFb8p0aFEM

dhivya0413 commented 12 months ago

Can we store multiple key-value pairs?