Updates
This commit is contained in:
@@ -12,6 +12,7 @@ const grab_keys_1 = __importDefault(require("../../utils/grab-keys"));
|
||||
* # Decrypt Function
|
||||
*/
|
||||
function decrypt({ encryptedString, encryptionKey, encryptionSalt, }) {
|
||||
var _a;
|
||||
if (!(encryptedString === null || encryptedString === void 0 ? void 0 : encryptedString.match(/./))) {
|
||||
console.log("Encrypted string is invalid");
|
||||
return encryptedString;
|
||||
@@ -35,6 +36,7 @@ function decrypt({ encryptedString, encryptionKey, encryptionSalt, }) {
|
||||
}
|
||||
catch (error) {
|
||||
console.log("Error in decrypting =>", error.message);
|
||||
(_a = global.ERROR_CALLBACK) === null || _a === void 0 ? void 0 : _a.call(global, `Error Decrypting data`, error);
|
||||
return encryptedString;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ const grab_keys_1 = __importDefault(require("../../utils/grab-keys"));
|
||||
* # Encrypt String
|
||||
*/
|
||||
function encrypt({ data, encryptionKey, encryptionSalt, }) {
|
||||
var _a;
|
||||
if (!(data === null || data === void 0 ? void 0 : data.match(/./))) {
|
||||
console.log("Encryption string is invalid");
|
||||
return data;
|
||||
@@ -36,6 +37,7 @@ function encrypt({ data, encryptionKey, encryptionSalt, }) {
|
||||
}
|
||||
catch (error) {
|
||||
console.log("Error in encrypting =>", error.message);
|
||||
(_a = global.ERROR_CALLBACK) === null || _a === void 0 ? void 0 : _a.call(global, `Error Encrypting Data`, error);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user