mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Add {,de}serialization steps for CryptoKey
This commit is contained in:
committed by
Andreas Kling
parent
ca54691ecf
commit
52f056503d
Notes:
sideshowbarker
2024-07-17 01:28:15 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/52f056503d Pull-request: https://github.com/SerenityOS/serenity/pull/23636
@@ -43,6 +43,20 @@
|
||||
println(`instanceOf DOMRect: ${domRect instanceof DOMRect}`);
|
||||
println(`DOMRect: ${JSON.stringify(domRect)}`);
|
||||
|
||||
let cryptoKey = await window.crypto.subtle.importKey(
|
||||
"raw",
|
||||
new TextEncoder().encode("password"),
|
||||
{ name: "PBKDF2" },
|
||||
false,
|
||||
["deriveBits", "deriveKey"]
|
||||
);
|
||||
let clonedCryptoKey = structuredClone(cryptoKey);
|
||||
println(`instanceOf CryptoKey: ${clonedCryptoKey instanceof CryptoKey}`);
|
||||
println(`CryptoKey.type: ${JSON.stringify(clonedCryptoKey.type)}`);
|
||||
println(`CryptoKey.extractable: ${JSON.stringify(clonedCryptoKey.extractable)}`);
|
||||
println(`CryptoKey.algorithm: ${JSON.stringify(clonedCryptoKey.algorithm)}`);
|
||||
println(`CryptoKey.usages: ${JSON.stringify(clonedCryptoKey.usages)}`);
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user