0
点赞
收藏
分享

微信扫一扫

vue使用SM4加密

萧让听雪 2022-02-15 阅读 34

安装

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
}
举报

相关推荐

0 条评论