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

Unified Diff: content/child/webcrypto/shared_crypto.cc

Issue 200763005: Support for the new WebCrypto digest by chunks API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated to latest WebCrypto API changes Created 6 years, 9 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
Index: content/child/webcrypto/shared_crypto.cc
diff --git a/content/child/webcrypto/shared_crypto.cc b/content/child/webcrypto/shared_crypto.cc
index af2beaca2a672fbbca28886ed65115dfb49e5112..0e67a6e9bd750a71d1e6ab42614f65ceae9501ce 100644
--- a/content/child/webcrypto/shared_crypto.cc
+++ b/content/child/webcrypto/shared_crypto.cc
@@ -519,6 +519,18 @@ Status Digest(const blink::WebCryptoAlgorithm& algorithm,
}
}
+blink::WebCryptoDigestor* CreateDigestor(blink::WebCryptoAlgorithm algorithm) {
+ switch (algorithm.id()) {
+ case blink::WebCryptoAlgorithmIdSha1:
+ case blink::WebCryptoAlgorithmIdSha256:
+ case blink::WebCryptoAlgorithmIdSha384:
+ case blink::WebCryptoAlgorithmIdSha512:
+ return platform::CreateDigestor(algorithm.id());
+ default:
+ return 0;
eroman 2014/03/25 23:26:23 return NULL in chromium land
jww 2014/03/26 00:42:31 Done.
+ }
+}
+
Status GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
blink::WebCryptoKeyUsageMask usage_mask,

Powered by Google App Engine
This is Rietveld 408576698