"use strict";(self.webpackChunknocode_platform=self.webpackChunknocode_platform||[]).push([[956],{18956:function(e,t,a){var n=a(25028),r=a(9564);n(t,"__esModule",{value:!0}),t.encryptByBase64=t.encrypt=t.decryptByBase64=t.decrypt=t.KEY=t.IV=void 0,t.encryptUserActionData=function(e){return new d.default((function(t,a){try{var n,r,c,d=e||{},l=d.time,o=d.nonce,p=d.ce,i=d.project,s=d.store,y=(0,f.default)(n=(0,f.default)(r=(0,f.default)(c="POST\n%2Fladdercs%2Fladderlog\nproject=".concat(i,"&store=")).call(c,s,"\nx-api-nonce:")).call(r,o,"\nx-api-timestamp:")).call(n,l,"\n"),B=u.default.HmacSHA256(y,p),g=u.default.enc.Hex.stringify(B);t({nonce:o,encrypt:u.default.enc.Base64.stringify(u.default.enc.Utf8.parse(g))})}catch(e){a(e)}}))},t.getEncodeValue=t.getDecodeValue=void 0;var c=r(a(24496)),d=r(a(28429)),f=r(a(760)),u=r(a(32468)),l=t.KEY="091A126D76A4B595",o=t.IV="B5EFEB5E3226D81A",p=t.encrypt=function(e,t,a){t=u.default.enc.Utf8.parse(t),a=u.default.enc.Utf8.parse(a),e=u.default.enc.Utf8.parse(e);var n={iv:a,mode:u.default.mode.CBC,padding:u.default.pad.Pkcs7},r=u.default.AES.encrypt(e,t,n).ciphertext.toString().toUpperCase(),c=u.default.enc.Hex.parse(r);return u.default.enc.Base64.stringify(c)},i=t.decrypt=function(e,t,a){t=u.default.enc.Utf8.parse(t);var n={iv:a=u.default.enc.Utf8.parse(a),mode:u.default.mode.CBC,padding:u.default.pad.Pkcs7},r=u.default.AES.decrypt(e,t,n);return r.toString(u.default.enc.Utf8).toString()};t.getDecodeValue=function(e){return e?i(e,l,o):e},t.getEncodeValue=function(e){return e?p(e,l,o):e},t.encryptByBase64=function(e){var t=e;(Array.isArray(t)||"[object Object]"===Object.prototype.toString.call(t))&&(t=(0,c.default)(t));var a=u.default.enc.Utf8.parse(t);return u.default.enc.Base64.stringify(a)},t.decryptByBase64=function(e){return u.default.enc.Base64.parse(e).toString(u.default.enc.Utf8)}}}]);