Test exporting an AES key.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS crypto.webkitSubtle.exportKey("raw") threw exception TypeError: Not enough arguments.
PASS crypto.webkitSubtle.exportKey("raw", null) threw exception TypeError: Type error.
PASS crypto.webkitSubtle.exportKey("raw", undefined) threw exception TypeError: Type error.
PASS crypto.webkitSubtle.exportKey("raw", {}) threw exception TypeError: Type error.
PASS crypto.webkitSubtle.exportKey("raw", 1) threw exception TypeError: Type error.

Importing a JWK key...
PASS crypto.webkitSubtle.exportKey(null, key) threw exception TypeError: Unknown key format.
PASS crypto.webkitSubtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.
PASS crypto.webkitSubtle.exportKey({}, key) threw exception TypeError: Unknown key format.
PASS crypto.webkitSubtle.exportKey("", key) threw exception TypeError: Unknown key format.
PASS crypto.webkitSubtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.

Exporting the key as raw data...
PASS bytesToHexString(new Uint8Array(exportedData)) is '8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b'
Exporting the key as JWK...
PASS exportedJWK.kty is 'oct'
PASS exportedJWK.k is 'jnOw99oOZFLIEPMrgJB55WL46tJSLGt7'
PASS exportedJWK.alg is 'A192CBC'
PASS exportedJWK.ext is true
PASS exportedJWK.use is undefined
PASS exportedJWK.key_ops is ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']

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

