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

Unified Diff: content/renderer/webcrypto/webcrypto_util.cc

Issue 116963002: [refactor] delete CreateHmacAlgorithmByHashOutputLen(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « content/renderer/webcrypto/webcrypto_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto/webcrypto_util.cc
diff --git a/content/renderer/webcrypto/webcrypto_util.cc b/content/renderer/webcrypto/webcrypto_util.cc
index b5a318a1be2b9a99721c737520c947a442f7172a..977c282c63b72230c52704bb74a9691d04ee0eec 100644
--- a/content/renderer/webcrypto/webcrypto_util.cc
+++ b/content/renderer/webcrypto/webcrypto_util.cc
@@ -88,34 +88,6 @@ blink::WebCryptoAlgorithm CreateAlgorithm(blink::WebCryptoAlgorithmId id) {
return blink::WebCryptoAlgorithm::adoptParamsAndCreate(id, NULL);
}
-blink::WebCryptoAlgorithm CreateHmacAlgorithmByHashOutputLen(
- unsigned short hash_output_length_bits) {
- blink::WebCryptoAlgorithmId hash_id;
- switch (hash_output_length_bits) {
- case 160:
- hash_id = blink::WebCryptoAlgorithmIdSha1;
- break;
- case 224:
- hash_id = blink::WebCryptoAlgorithmIdSha224;
- break;
- case 256:
- hash_id = blink::WebCryptoAlgorithmIdSha256;
- break;
- case 384:
- hash_id = blink::WebCryptoAlgorithmIdSha384;
- break;
- case 512:
- hash_id = blink::WebCryptoAlgorithmIdSha512;
- break;
- default:
- NOTREACHED();
- return blink::WebCryptoAlgorithm::createNull();
- }
- return blink::WebCryptoAlgorithm::adoptParamsAndCreate(
- blink::WebCryptoAlgorithmIdHmac,
- new blink::WebCryptoHmacParams(CreateAlgorithm(hash_id)));
-}
-
blink::WebCryptoAlgorithm CreateHmacAlgorithmByHashId(
blink::WebCryptoAlgorithmId hash_id) {
DCHECK(IsHashAlgorithm(hash_id));
« no previous file with comments | « content/renderer/webcrypto/webcrypto_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698