e40f: function (e, t, a) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.encrypt = n,
t.decrypt = r;
var s = i(a("bffd"));
function i(e) {
return e && e.__esModule ? e : {
default:
e
}
}
function n(e, t) {
var a = o(t),
i = c(t),
n = s.default.enc.Utf8.parse(i),
r = s.default.enc.Utf8.parse(a),
l = s.default.AES.encrypt(e, n, {
iv: r,
mode: s.default.mode.CBC,
padding: s.default.pad.Pkcs7
});
return l.toString()
}
function r(e, t) {
var a = o(t),
i = c(t),
n = s.default.enc.Utf8.parse(i),
r = s.default.enc.Utf8.parse(a),
l = s.default.AES.decrypt(e, n, {
iv: r,
padding: s.default.pad.Pkcs7
});
return l.toString(s.default.enc.Utf8)
}
function o() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "web",
t = e.toUpperCase(),
a = l("ymd") + t,
i = s.default.MD5(a).toString();
return i.substr(8, 16)
}
function c() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "web",
t = e.toUpperCase(),
a = t + l("ymd"),
i = s.default.MD5(a).toString();
return i.substr(8, 16)
}
function l(e) {
var t = new Date,
a = t.getFullYear(),
s = t.getMonth() + 1,
i = t.getDate(),
n = t.getHours() < 10 ? "0" + t.getHours() : t.getHours(),
r = t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes(),
o = t.getSeconds() < 10 ? "0" + t.getSeconds() : t.getSeconds();
return s >= 1 && s <= 9 && (s = "0" + s),
i >= 0 && i <= 9 && (i = "0" + i),
n >= 0 && n <= 9 && (n = "0" + n),
r >= 0 && r <= 9 && (r = "0" + r),
o >= 0 && o <= 9 && (o = "0" + o),
-1 != e.indexOf("y") && (e = e.replace("y", a)),
-1 != e.indexOf("m") && (e = e.replace("m", s)),
-1 != e.indexOf("d") && (e = e.replace("d", i)),
-1 != e.indexOf("h") && (e = e.replace("h", n)),
-1 != e.indexOf("i") && (e = e.replace("i", r)),
-1 != e.indexOf("s") && (e = e.replace("s", o)),
e
}
},
function n(e, t) {
var a = o(t),
i = c(t),
n = s.default.enc.Utf8.parse(i),
r = s.default.enc.Utf8.parse(a),
l = s.default.AES.encrypt(e, n, {
iv: r,
mode: s.default.mode.CBC,
padding: s.default.pad.Pkcs7
});
return l.toString()
}
function c() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "web",
t = e.toUpperCase(),
a = t + l("ymd"),
i = s.default.MD5(a).toString();
return i.substr(8, 16)
}
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "web" 这三目运算不多讲了,反正你记住,不是“api”就是“web”,;
t = e.toUpperCase();把我们的参数到大写,a = t + l("ymd"), a=参数+l(“ymd”);这个l方法就是取得今天的年月日