随笔分类 -  加密

摘要:1.安装 crypto-js 通过npm install crypto-js -s 2.创建AES.js 1.在src/util/文件夹下创建res.js文件 2.res.js的加密和解密函数 import CryptoJS from "crypto-js/crypto-js"; const KEY 阅读全文
posted @ 2022-03-18 14:19 小成- 阅读(317) 评论(0) 推荐(0) 编辑
摘要:1.安装: npm install jsencrypt --save-dev 2.创建rsa.js 1.在src/util/文件夹下创建rsa.js文件 2. 引入'jsencrypt', 'encryptlong' /* 产引入jsencrypt实现数据RSA加密 */ import JSEncr 阅读全文
posted @ 2022-03-18 11:08 小成- 阅读(819) 评论(1) 推荐(1) 编辑
摘要:安装: npm install --save sm-crypto 引用 const sm3 = require('sm-crypto').sm3 let data = '12345' sm3(data) 阅读全文
posted @ 2022-03-18 10:22 小成- 阅读(1128) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示