perf:增加base64Key
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
const base64js = require("base64-js");
|
||||
const keyBase64 = "WmdUzPJXbngVNiaSsQrihg==";
|
||||
const SM4 = require("./SM4");
|
||||
|
||||
class Crypto {
|
||||
|
||||
constructor() {
|
||||
this.sm4 = new SM4({
|
||||
keyBuffer: base64js.toByteArray(keyBase64),
|
||||
keyBuffer: base64js.toByteArray(window.httpConfig.base64Key),
|
||||
mode: "ecb",
|
||||
cipherType: 'base64'
|
||||
})
|
||||
@@ -31,4 +30,4 @@ class Crypto {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new Crypto();
|
||||
module.exports = new Crypto();
|
||||
|
||||
Reference in New Issue
Block a user