加密方法升级md5改成 sha256,局部安装及使用

This commit is contained in:
li.yuetong
2022-09-09 15:08:18 +08:00
parent 311bfc6637
commit ad6fa8b9b4

View File

@@ -3,8 +3,8 @@
* @Date create in 2021/03/16
*/
import { JSEncrypt } from 'jsencrypt'
import { sha256 } from 'js-sha256'
let CryptoJS = require('crypto-js')
let sha256 = require('js-sha256')
//生成随机字符串默认24位
export function randomString(len) {
len = len || 24