vue使用SM4加密
安装npm install gm-crypt引用const SM4 = require('gm-crypt').sm4let sm4Config = {key: 'KacLKDJkljasf89f',mode: 'cbc', // defaultiv: 'JSLKJFJLKFsdfass', // default is null// optional: this is the cipher dat
·
安装
npm install gm-crypt
引用
const SM4 = require('gm-crypt').sm4
let sm4Config = {
key: 'KacLKDJkljasf89f',
mode: 'cbc', // default
iv: 'JSLKJFJLKFsdfass', // default is null
// optional: this is the cipher data's type; Can be 'base64' or 'text'
cipherType: 'base64' // default is base64
}
let sm4 = new SM4(sm4Config)
export default {
sm4
}
更多推荐
已为社区贡献6条内容
所有评论(0)