如何在React native中加密数据(使用Expo) [英] How to Encrypt data in React native (Using Expo)

查看:103
本文介绍了如何在React native中加密数据(使用Expo)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用给定的密钥和iV简单地加密消息.我已经尝试了几个库来实现此目的,但是Expo与其中的任何一个都不兼容.我找不到用于Expo的任何加密库(支持AES ).我想我的问题是:如何在运行Expo的React Native中加密数据

I'm trying to simply encrypt a message using a given key and iV. I've tried several libraries to achieve this but Expo isn't compatible with any of them. I couldn't find any encryption libraries for Expo (That support AES). I guess my question is : How do I encrypt data in React Native running Expo

Ps:我对 expo-crypto 不感兴趣

推荐答案

另一种可能性(我做了什么)是使用CryptoES库.

Another possibility (what I did) is to use the CryptoES library.

https://www.npmjs.com/package/crypto-es

经过长时间的搜索,我发现它是CryptoJS库3.1版的继续开发,可以与Expo一起使用.

After long search I found it, it is a continued development of the 3.1 version of the CryptoJS library and can be used with Expo.

这篇关于如何在React native中加密数据(使用Expo)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆