33 lines
859 B
HTML
33 lines
859 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<script src="../resources/common.js"></script>
|
|
</head>
|
|
<body>
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
|
|
<script>
|
|
description("Test generating an AES key with length 192 using AES-CBC algorithm.");
|
|
|
|
jsTestIsAsync = true;
|
|
|
|
debug("Generating a key...");
|
|
crypto.subtle.generateKey({name: "aes-cbc", length: 192}, true, ["decrypt", "encrypt", "unwrapKey", "wrapKey"]).then(function(result) {
|
|
key = result;
|
|
|
|
shouldBe("key.type", "'secret'");
|
|
shouldBe("key.extractable", "true");
|
|
shouldBe("key.algorithm.name", "'AES-CBC'");
|
|
shouldBe("key.algorithm.length", "192");
|
|
shouldBe("key.usages", "['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']");
|
|
|
|
finishJSTest();
|
|
});
|
|
</script>
|
|
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|