react-native-keychain icon indicating copy to clipboard operation
react-native-keychain copied to clipboard

Encrypt a value without storing it

Open pasquale95 opened this issue 2 years ago • 1 comments

Hi, I open this issue to know if there's a way I can encrypt a value with an hardware key and get back the encrypted result without storing such result in the app space. From the documentation it seems that there is no way to get the encrypted value. Any suggestion?

Thanks!

pasquale95 avatar Aug 10 '23 10:08 pasquale95

You would create an encryption key using this library, and have the encryption key stored in the keychain/keystore, then use that to encrypt your data, depending on the nature of your requirements, you could simply store the encrypted data with the AsyncStorage API.

Create encryption key with this library Use that key to encrypt your data Save the encrypted data (string) with AsyncStorage for example Retrieve encryption key with this library to decrypt the data.

fendorio avatar Jan 19 '24 11:01 fendorio