blob: 2d45d9eda160236da3bc1f5994c095ec0df1652d [file] [log] [blame]
Test generating a HMAC key.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Generating a key with default length...
error is: TypeError: Failed to execute 'generateKey' on 'SubtleCrypto': HmacKeyGenParams: hash: Missing or not an AlgorithmIdentifier
error is: TypeError: Failed to execute 'generateKey' on 'SubtleCrypto': HmacKeyGenParams: hash: Missing or not an AlgorithmIdentifier
error is: TypeError: Failed to execute 'generateKey' on 'SubtleCrypto': HmacKeyGenParams: length: Is not a number
error is: TypeError: Failed to execute 'generateKey' on 'SubtleCrypto': HmacKeyGenParams: length: Is not a number
PASS key.type is 'secret'
PASS key.extractable is true
PASS key.algorithm.name is 'HMAC'
PASS key.algorithm.length is 512
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 40
PASS key.usages is ["sign"]
PASS successfullyParsed is true
TEST COMPLETE