blob: 53921e42703fe14b2eeee621aa121303b6028cbb [file] [log] [blame]
Test generating a HMAC key.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS crypto.subtle.generateKey("hmac", extractable, ["sign", "verify"]) threw exception TypeError: Type error.
PASS crypto.subtle.generateKey({name: "hmac"}, extractable, ["sign", "verify"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
PASS crypto.subtle.generateKey({name: "hmac", length: undefined}, extractable, ["sign", "verify"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
PASS crypto.subtle.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