Bug Fixes
This commit is contained in:
@@ -45,6 +45,37 @@ module.exports = require("fs");
|
||||
|
||||
module.exports = require("path");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5425:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
// @ts-check
|
||||
|
||||
const { scryptSync , createDecipheriv } = __webpack_require__(6113);
|
||||
const { Buffer } = __webpack_require__(4300);
|
||||
/**
|
||||
* @param {string} encryptedString
|
||||
* @returns {string | null}
|
||||
*/ const decrypt = (encryptedString)=>{
|
||||
const algorithm = "aes-192-cbc";
|
||||
const password = process.env.DSQL_ENCRYPTION_PASSWORD || "";
|
||||
const salt = process.env.DSQL_ENCRYPTION_SALT || "";
|
||||
let key = scryptSync(password, salt, 24);
|
||||
let iv = Buffer.alloc(16, 0);
|
||||
// @ts-ignore
|
||||
const decipher = createDecipheriv(algorithm, key, iv);
|
||||
try {
|
||||
let decrypted = decipher.update(encryptedString, "hex", "utf8");
|
||||
decrypted += decipher.final("utf8");
|
||||
return decrypted;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
module.exports = decrypt;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5827:
|
||||
@@ -272,7 +303,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
var __webpack_require__ = require("../../../webpack-api-runtime.js");
|
||||
__webpack_require__.C(exports);
|
||||
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
||||
var __webpack_exports__ = __webpack_require__.X(0, [5425,2224,2163,3017,3403,8326,1311], () => (__webpack_exec__(5827)));
|
||||
var __webpack_exports__ = __webpack_require__.X(0, [2224,2163,3017,3403,8326,1311], () => (__webpack_exec__(5827)));
|
||||
module.exports = __webpack_exports__;
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user