离子本地存储与安全存储

Ionic local storage vs secure storage

我目前正在使用 @ionic-native/secure-storage,但问题是它不适用于 android,所以我正在考虑使用 @capacitor/core 中的 Plugins.Storage

我的问题是这两者之间到底有什么区别。据我所知,在这两种情况下使用都无法看到数据,那么是什么让 @ionic-native/secure-storage 更安全,什么时候需要使用它?

@ionic-native/secure-storage 只是 cordova-plugin-secure-storage.

的接口

最大的区别是 cordova-plugin-secure-storage 使用 encryption for storage on all the platforms it supports

Capacitor 的 Storage 插件适用于简单的键值数据,存储在设备上安全性较低的区域。

On iOS Storage plugin will use UserDefaults and on Android SharedPreferences. Stored data is cleared if the app is uninstalled.