Index: components/webcrypto/algorithms/test_helpers.h |
diff --git a/components/webcrypto/algorithms/test_helpers.h b/components/webcrypto/algorithms/test_helpers.h |
index 00680d78a23ce01d4e86f5160918451c4365ed1e..18872553df6cde4e7dbe0ae214c0ef4efbdf04e5 100644 |
--- a/components/webcrypto/algorithms/test_helpers.h |
+++ b/components/webcrypto/algorithms/test_helpers.h |
@@ -206,6 +206,17 @@ std::vector<uint8_t> GetKeyDataFromJsonTestCase( |
blink::WebCryptoNamedCurve GetCurveNameFromDictionary( |
const base::DictionaryValue* dict); |
+// Creates an HMAC import algorithm whose inner hash algorithm is determined by |
+// the specified algorithm ID. It is an error to call this method with a hash |
+// algorithm that is not SHA*. |
+blink::WebCryptoAlgorithm CreateHmacImportAlgorithm( |
+ blink::WebCryptoAlgorithmId hash_id, |
+ unsigned int length_bits); |
+ |
+// Same as above but without specifying a length. |
+blink::WebCryptoAlgorithm CreateHmacImportAlgorithmNoLength( |
+ blink::WebCryptoAlgorithmId hash_id); |
+ |
} // namespace webcrypto |
#endif // COMPONENTS_WEBCRYPTO_ALGORITHMS_TEST_HELPERS_H_ |