Update index.ts

This commit is contained in:
Romaric Mourgues
2023-04-24 19:12:23 +02:00
committed by GitHub
parent a454875602
commit 553278ecf9
+3 -1
View File
@@ -34,6 +34,8 @@ export function decrypt(data: string, encryptionKey: string): CryptoResult {
if (result.done) { if (result.done) {
return result; return result;
} }
return result;
} }
return { data, done: true }; return { data, done: true };
@@ -48,6 +50,6 @@ export function encrypt(
encryptionKey: any, encryptionKey: any,
options: { disableSalts?: boolean } = {}, options: { disableSalts?: boolean } = {},
): CryptoResult { ): CryptoResult {
if (!encryptionKey) return value; if (!encryptionKey) return ˋ${value}`;
return v2.encrypt(value, encryptionKey, options); return v2.encrypt(value, encryptionKey, options);
} }