blob: 6b86dfbd1d054d519767aa970fce6ca14d85b195 [file] [log] [blame]
[Worker] Test generating an HMAC key using SHA-1 algorithm in workers.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Starting worker: resources/hmac-generate-key.js
[Worker] Generating a key...
PASS [Worker] crypto.subtle.generateKey({name: "hmac", hash: "sha-1"}, extractable, ["encrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS [Worker] crypto.subtle.generateKey({name: "hmac", hash: "sha-1", length: 0}, extractable, ["sign", "verify"]) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS [Worker] key.type is 'secret'
PASS [Worker] key.extractable is true
PASS [Worker] key.algorithm.name is 'HMAC'
PASS [Worker] key.algorithm.length is 512
PASS [Worker] key.algorithm.hash.name is 'SHA-1'
PASS [Worker] key.usages is ["sign", "verify"]
PASS successfullyParsed is true
TEST COMPLETE