Fixed and improved encryption handling. Also wrapping up for the day.

This commit is contained in:
Scott Idem
2025-05-16 17:29:33 -04:00
parent 8b68b0d2bb
commit f88e6cef89
5 changed files with 154 additions and 96 deletions

View File

@@ -101,7 +101,7 @@ export let decrypt_wrapper = async function decrypt_wrapper(
) {
if (!combined) {
console.error('No combined string provided. Returning empty string.');
return '';
return false;
}
const { iv, base64 } = split_iv_and_base64(combined);
let decrypted;
@@ -114,7 +114,7 @@ export let decrypt_wrapper = async function decrypt_wrapper(
}
} catch (error) {
console.error('Decryption failed:', error);
return '';
return false;
}
return decrypted;
}