摘要:
function getUUID() { function S4() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); } return (S4() + S4() + "-" + S4() + "-" 阅读全文
posted @ 2022-03-18 14:28
小成-
阅读(437)
评论(0)
推荐(1)
摘要:
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
小成-
阅读(323)
评论(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
小成-
阅读(843)
评论(1)
推荐(1)
摘要:
安装: npm install --save sm-crypto 引用 const sm3 = require('sm-crypto').sm3 let data = '12345' sm3(data) 阅读全文
posted @ 2022-03-18 10:22
小成-
阅读(1145)
评论(0)
推荐(0)