[英]What is the proper way to store sensitive data in react native app?
the most secure way to save sensitive data such as token or payment information.保存令牌或支付信息等敏感数据的最安全方式。
should I store them in the android AsyncStorage, in the redux-store or shared preferences?我应该将它们存储在 android AsyncStorage、redux-store 还是共享首选项中?
When it comes to storing sensitive data in a React Native app, it's important to use a secure storage solution that encrypts the data at rest, so that it can't be easily accessed by unauthorized parties.在 React Native 应用程序中存储敏感数据时,使用安全存储解决方案对 rest 中的数据进行加密非常重要,这样未经授权的方就无法轻易访问这些数据。 Some options for secure storage in a React Native app include: React Native 应用程序中用于安全存储的一些选项包括:
Keychain : The Keychain is an iOS-only solution that stores the data in an encrypted format on the device's secure enclave. Keychain :Keychain 是一种仅限 iOS 的解决方案,它以加密格式将数据存储在设备的安全区域中。 It is a built-in iOS feature and the most secure way to store sensitive data.它是内置的 iOS 功能,是存储敏感数据的最安全方式。
Encryption libraries : You can use encryption libraries such as react-native-sensitive-info or react-native-keychain to encrypt the data yourself before storing it.加密库:您可以使用诸如 react-native-sensitive-info 或 react-native-keychain 之类的加密库在存储数据之前自行加密数据。 These libraries provide an API for encrypting and decrypting data, which you can use to protect sensitive data in your app.这些库提供了一个 API 用于加密和解密数据,您可以使用它来保护应用程序中的敏感数据。
Secure storage libraries : There are also libraries specifically designed for secure storage in React Native apps such as react-native-secure-storage which will take care of encryption and storage together.安全存储库:还有专门为 React Native 应用程序中的安全存储而设计的库,例如 react-native-secure-storage,它将同时处理加密和存储。
The libraries图书馆
Now multiples libraries allow you to store sensitive in React Native code:现在多个库允许您在 React Native 代码中存储敏感信息:
Note: On the native side, these libraries can use:注意:在本机端,这些库可以使用:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.