登录社区云,与社区用户共同成长
邀请您加入社区
问题描述:
为了增强用户数据的安全性,我需要在本地存储敏感数据时进行加密。请问 HarmonyOS 中是否有提供本地存储加密的 API,如何在应用中安全地存储加密数据?
代码相关:
```ts storage.encryptData('userToken', 'sensitiveData').then((encryptedData) => { storage.save('encryptedDataKey', encryptedData); }); ```