feat: extend crypto-locker plugin to support automatic AES encryption for static assets via new useCryptoAsset hook
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user