4 <script src=
"../../resources/js-test.js"></script>
5 <script src=
"resources/common.js"></script>
9 description("Check that an already imported key with empty usages can be deserialized.");
11 // It used to be possible to import keys with empty usages, it is possible that
12 // such keys were persisted to storage. This test verifies that such keys can
13 // still be successfully de-serialized.
15 // The version number of the serialized format used is 7.
17 var serializedKey
= "ff073f004b010110011030112233445566778899aabbccddeeff";
19 var key
= internals
.deserializeBuffer(hexStringToUint8Array(serializedKey
).buffer
);
21 shouldBeEqualToString("key.type", "secret");
22 shouldBeTrue("key.extractable");
23 shouldBeEqualToString("key.algorithm.name", "AES-CBC");
24 shouldBe("key.usages", "[]");