This commit is contained in:
Benjamin Toby
2025-02-19 20:01:50 +01:00
parent c08db13f3d
commit e9bb9fb07f
113 changed files with 253 additions and 63 deletions
+2
View File
@@ -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;
}
}
+2
View File
@@ -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;
}
}