1 Test wrapping and unwrapping AES keys with RSA-OAEP.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
7 Importing an AES key...
9 PASS wrappedKey.toString() is '[object ArrayBuffer]'
11 PASS unwrappedKey.toString() is '[object CryptoKey]'
12 PASS unwrappedKey.type is 'secret'
13 PASS unwrappedKey.extractable is true
14 PASS unwrappedKey.algorithm.name is 'AES-CBC'
15 PASS unwrappedKey.algorithm.length is 256
16 PASS unwrappedKey.usages is ['encrypt', 'decrypt']
18 PASS bytesToHexString(unwrappedKeyData) is bytesToHexString(aesKeyData)
20 Wrapping the same key as JWK...
21 PASS wrappedKey.toString() is '[object ArrayBuffer]'
23 PASS unwrappedKey.toString() is '[object CryptoKey]'
24 PASS unwrappedKey.type is 'secret'
25 PASS unwrappedKey.extractable is true
26 PASS unwrappedKey.algorithm.name is 'AES-CBC'
27 PASS unwrappedKey.algorithm.length is 256
28 PASS unwrappedKey.usages is ['encrypt', 'decrypt']
30 PASS bytesToHexString(unwrappedKeyData) is bytesToHexString(aesKeyData)
31 PASS successfullyParsed is true