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

Unified Diff: content/child/webcrypto/webcrypto_impl.h

Issue 200763005: Support for the new WebCrypto digest by chunks API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated return param of FinishWithWebArrayAndStatus 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/webcrypto_impl.h
diff --git a/content/child/webcrypto/webcrypto_impl.h b/content/child/webcrypto/webcrypto_impl.h
index bdb3928e0b286d44e9435ee716402337ea453ace..12724bc18397ca2e9d75e103efeb3e550bddc75d 100644
--- a/content/child/webcrypto/webcrypto_impl.h
+++ b/content/child/webcrypto/webcrypto_impl.h
@@ -83,6 +83,14 @@ class WebCryptoImpl : public blink::WebCrypto {
const unsigned char* data,
unsigned int data_size,
blink::WebArrayBuffer& result);
+ // This method returns a digestor object that can be used to synchronously
+ // compute a digest one chunk at a time. Thus, the consume does not need to
+ // hold onto a large buffer with all the data to digest. Chunks can be given
+ // one at a time and the digest will be computed piecemeal. The allocated
+ // WebCrytpoDigestor that is returned by createDigestor must be freed by the
+ // caller.
+ virtual blink::WebCryptoDigestor* createDigestor(
+ const blink::WebCryptoAlgorithmId algorithm_id);
eroman 2014/03/26 01:43:54 IMPORTANT: In the blink interface the input is non
jww 2014/03/26 18:49:40 Good catch! I ran some tests, and it seems like it
virtual bool deserializeKeyForClone(
const blink::WebCryptoKeyAlgorithm& algorithm,

Powered by Google App Engine
This is Rietveld 408576698