ecs加解密_微信小程序--AES加密解密 ----ECS,Pkcs7,Hex,Utf8

var t = t || function (t, e) { var r = {}, i = r.lib = {}, n = function () { }, o = i.Base = { extend: function (t) { n.prototype = this; var e = new n(); return t && e.mixIn(t), e.hasOwnProperty("init") || (e.init = function () { e.$super.init.apply(this, arguments) }), e.init.prototype = e, e.$super = this, e }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } }, s = i.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], this.sigBytes = void 0 != e ? e : 4 * t.length }, toString: function (t) { return (t || a).stringify(this) }, concat: function (t) { var e = this.words, r = t.words, i = this.sigBytes; if (t = t.sigBytes, this.clamp(), i % 4) for (var n = 0; n < t; n++)e[i + n >>> 2] |= (r[n >>> 2] >>> 24 - n % 4 * 8 & 255) << 24 - (i + n) % 4 * 8; else if (65535 < r.length) for (n = 0; n < t; n += 4)e[i + n >>> 2] = r[n >>> 2]; else e.push.apply(e, r); return this.sigBytes += t, this }, clamp: function () { var e = this.words, r = this.sigBytes; e[r >>> 2] &= 4294967295 << 32 - r % 4 * 8, e.length = t.ceil(r / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (e) { for (var r = [], i = 0; i < e; i += 4)r.push(4294967296 * t.random() | 0); return new s.init(r, e) } }), c = r.enc = {}, a = c.Hex = { stringify: function (t) { var e = t.words; t = t.sigBytes; for (var r = [], i = 0; i < t; i++) { var n = e[i >>> 2] >>> 24 - i % 4 * 8 & 255; r.push((n >>> 4).toString(16)), r.push((15 & n).toString(16)) } return r.join("") }, parse: function (t) { for (var e = t.length, r = [], i = 0; i < e; i += 2)r[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(r, e / 2) } }, f = c.Latin1 = { stringify: function (t) { var e = t.words; t = t.sigBytes; for (var r = [], i = 0; i < t; i++)r.push(String.fromCharCode(e[i >>> 2] >>> 24 - i % 4 * 8 & 255)); return r.join("") }, parse: function (t) { for (var e = t.length, r = [], i = 0; i < e; i++)r[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(r, e) } }, h = c.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(f.stringify(t))) } catch (t) { throw Error("Malformed UTF-8 data"); } }, parse: function (t) { return f.parse(unescape(encodeURIComponent(t))) } }, u = i.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init(), this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = h.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (e) { var r = this._data, i = r.words, n = r.sigBytes, o = this.blockSize, c = n / (4 * o); if (e = (c = e ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0)) * o, n = t.min(4 * e, n), e) { for (var a = 0; a < e; a += o)this._doProcessBlock(i, a); a = i.splice(0, e), r.sigBytes -= n } return new s.init(a, n) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }); i.Hasher = u.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { u.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { return t && this._append(t), this._doFinalize() }, blockSize: 16, _createHelper: function (t) { return function (e, r) { return new t.init(r).finalize(e) } }, _createHmacHelper: function (t) { return function (e, r) { return new p.HMAC.init(t, r).finalize(e) } } }); var p = r.algo = {}; return r }(Math); !function () { var e = t, r = e.lib.WordAr

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值