feat: extend crypto-locker plugin to support automatic AES encryption for static assets via new useCryptoAsset hook

This commit is contained in:
Vitalii Litvinchuk
2026-06-10 20:12:05 +03:00
parent d83b82a5c6
commit 8fa7846da0
7 changed files with 310 additions and 29 deletions
+4
View File
@@ -37,6 +37,10 @@ export function useCryptoLocker<T = unknown>() {
throw new Error("Module does not export 'encryptedData'.");
}
if (mod.type !== "component") {
throw new Error("Expected a 'component' module, but received: " + mod.type);
}
const bytes = CryptoJS.AES.decrypt(ciphertext, password);
const plaintextCode = bytes.toString(CryptoJS.enc.Utf8);