| <script src="../../resources/js-test-pre.js"></script> |
| <script src="../resources/common.js"></script> |
| description("Test verification with HMAC SHA-224 using an imported key"); |
| var text = asciiToUint8Array("Hello, World!"); |
| var rawKey = asciiToUint8Array("jnOw99oOZFLIEPMr"); |
| var signature = hexStringToUint8Array("70b638e082fabc3bf391a1935c4b6a74168401214f4fb5c31e0cebf4"); |
| crypto.subtle.importKey("raw", rawKey, hmacImportParams, extractable, ["sign", "verify"]).then(function(key) { |
| return crypto.subtle.verify("hmac", key, signature, text); |
| }).then(function(result) { |
| shouldBeTrue("verified"); |
| <script src="../../resources/js-test-post.js"></script> |