{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\xq-web-bpm\\src\\tripartite\\buildBigScreen\\src\\utils\\crypto.js","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\tripartite\\buildBigScreen\\src\\utils\\crypto.js","mtime":1675071992678},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.to-string\";\nimport _classCallCheck from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport CryptoJS from 'crypto-js';\n\nvar crypto = /*#__PURE__*/function () {\n function crypto() {\n _classCallCheck(this, crypto);\n }\n\n _createClass(crypto, null, [{\n key: \"encrypt\",\n value: // 使用AesUtil.genAesKey()生成,需和后端配置保持一致\n // 使用DesUtil.genDesKey()生成,需和后端配置保持一致\n\n /**\r\n * aes 加密方法\r\n * @param data\r\n * @returns {*}\r\n */\n function encrypt(data) {\n return this.encryptAES(data, this.aesKey);\n }\n /**\r\n * aes 解密方法\r\n * @param data\r\n * @returns {*}\r\n */\n\n }, {\n key: \"decrypt\",\n value: function decrypt(data) {\n return this.decryptAES(data, this.aesKey);\n }\n /**\r\n * aes 加密方法,同java:AesUtil.encryptToBase64(text, aesKey);\r\n */\n\n }, {\n key: \"encryptAES\",\n value: function encryptAES(data, key) {\n var dataBytes = CryptoJS.enc.Utf8.parse(data);\n var keyBytes = CryptoJS.enc.Utf8.parse(key);\n var encrypted = CryptoJS.AES.encrypt(dataBytes, keyBytes, {\n iv: keyBytes,\n mode: CryptoJS.mode.CBC,\n padding: CryptoJS.pad.Pkcs7\n });\n return CryptoJS.enc.Base64.stringify(encrypted.ciphertext);\n }\n /**\r\n * aes 解密方法,同java:AesUtil.decryptFormBase64ToString(encrypt, aesKey);\r\n */\n\n }, {\n key: \"decryptAES\",\n value: function decryptAES(data, key) {\n var keyBytes = CryptoJS.enc.Utf8.parse(key);\n var decrypted = CryptoJS.AES.decrypt(data, keyBytes, {\n iv: keyBytes,\n mode: CryptoJS.mode.CBC,\n padding: CryptoJS.pad.Pkcs7\n });\n return CryptoJS.enc.Utf8.stringify(decrypted);\n }\n /**\r\n * des 加密方法,同java:DesUtil.encryptToBase64(text, desKey)\r\n */\n\n }, {\n key: \"encryptDES\",\n value: function encryptDES(data, key) {\n var keyHex = CryptoJS.enc.Utf8.parse(key);\n var encrypted = CryptoJS.DES.encrypt(data, keyHex, {\n mode: CryptoJS.mode.ECB,\n padding: CryptoJS.pad.Pkcs7\n });\n return encrypted.toString();\n }\n /**\r\n * des 解密方法,同java:DesUtil.decryptFormBase64(encryptBase64, desKey);\r\n */\n\n }, {\n key: \"decryptDES\",\n value: function decryptDES(data, key) {\n var keyHex = CryptoJS.enc.Utf8.parse(key);\n var decrypted = CryptoJS.DES.decrypt({\n ciphertext: CryptoJS.enc.Base64.parse(data)\n }, keyHex, {\n mode: CryptoJS.mode.ECB,\n padding: CryptoJS.pad.Pkcs7\n });\n return decrypted.toString(CryptoJS.enc.Utf8);\n }\n }]);\n\n return crypto;\n}();\n\n_defineProperty(crypto, \"aesKey\", \"O2BEeIv399qHQNhD6aGW8R8DEj4bqHXm\");\n\n_defineProperty(crypto, \"desKey\", \"jMVCBsFGDQr1USHo\");\n\nexport { crypto as default };",null]}