1 Test generating, importing and exporting keys for AES-KW. Test that they can't be used with another algorithm.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
7 PASS key.toString() is '[object CryptoKey]'
8 PASS key.type is 'secret'
9 PASS key.algorithm.name is 'AES-KW'
10 PASS key.algorithm.length is 256
12 Testing that the key can't be used with AES-CBC...
13 error is: InvalidAccessError: key.algorithm does not match that of operation
15 Exporting the key to raw...
16 PASS exportedKey.toString() is '[object ArrayBuffer]'
18 PASS importedKey.toString() is '[object CryptoKey]'
19 PASS importedKey.type is 'secret'
20 PASS importedKey.algorithm.name is 'AES-KW'
21 PASS importedKey.algorithm.length is 256
22 PASS successfullyParsed is true