Test generating a HMAC key.

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


PASS crypto.webkitSubtle.generateKey("hmac", extractable, ["sign", "verify"]) threw exception TypeError: Type error.
PASS crypto.webkitSubtle.generateKey({name: "hmac"}, extractable, ["sign", "verify"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
PASS crypto.webkitSubtle.generateKey({name: "hmac", length: undefined}, extractable, ["sign", "verify"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
PASS crypto.webkitSubtle.generateKey({name: "hmac", length: {}}, extractable, ["sign", "verify"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..

Generating a key with default length...
PASS key.type is 'secret'
PASS key.extractable is true
PASS key.algorithm.name is 'HMAC'
PASS key.algorithm.length is 64
PASS key.algorithm.hash.name is 'SHA-1'
PASS key.usages is ["sign", "verify"]

Generating a key with custom length...
PASS key.type is 'secret'
PASS key.extractable is true
PASS key.algorithm.name is 'HMAC'
PASS key.algorithm.length is 5
PASS key.algorithm.hash.name is 'SHA-1'
PASS key.usages is ["sign"]
PASS successfullyParsed is true

TEST COMPLETE

