tangshi300/lib/aes.js

9 lines
252 B
JavaScript
Raw Permalink Normal View History

2024-12-05 14:56:07 +08:00
var e = require("crypto-js");
module.exports.decrypt = function(r, t) {
var c = e.enc.Hex.parse(t), d = e.AES.decrypt(e.format.Hex.parse(r), c, {
mode: e.mode.ECB,
padding: e.pad.Pkcs7
});
return e.enc.Utf8.stringify(d);
};