Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Unified Diff: components/webcrypto/algorithms/test_helpers.h

Issue 1355873002: [refactor] More post-NSS WebCrypto cleanups (utility functions). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address David's comments Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/webcrypto/algorithms/secret_key_util.cc ('k') | components/webcrypto/algorithms/test_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « components/webcrypto/algorithms/secret_key_util.cc ('k') | components/webcrypto/algorithms/test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698