| Test exporting an AES key. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| Importing a JWK key... |
| PASS crypto.subtle.exportKey(null, key) threw exception TypeError: Unknown key format. |
| PASS crypto.subtle.exportKey(undefined, key) threw exception TypeError: Unknown key format. |
| PASS crypto.subtle.exportKey({}, key) threw exception TypeError: Unknown key format. |
| PASS crypto.subtle.exportKey("", key) threw exception TypeError: Unknown key format. |
| PASS crypto.subtle.exportKey("foobar", key) threw exception TypeError: Unknown key format. |
| Exporting the key as raw data... |
| PASS bytesToHexString(new Uint8Array(exportedData)) is '6a18e49feff7f3b7e09ec89b7f6deab2f6a18e49feff7f3b7e09ec89b7f6deab' |
| Exporting the key as JWK... |
| PASS exportedJWK.kty is 'oct' |
| PASS exportedJWK.k is 'ahjkn-_387fgnsibf23qsvahjkn-_387fgnsibf23qs' |
| PASS exportedJWK.alg is 'HS256' |
| PASS exportedJWK.ext is true |
| PASS exportedJWK.use is undefined |
| PASS exportedJWK.key_ops is ['sign', 'verify'] |
| |
| Importing a key that's not extractable... |
| |
| Trying to export as raw... |
| PASS Rejected, as expected |
| Trying to export as jwk... |
| PASS Rejected, as expected |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |