Index: content/renderer/webcrypto/webcrypto_impl.cc |
diff --git a/content/renderer/webcrypto/webcrypto_impl.cc b/content/renderer/webcrypto/webcrypto_impl.cc |
index 4cb77d58bea9024b63a25c23465ba2ce631f7bc7..3eddb7f7d6d6b11acc0982f3001b4fd2a785413d 100644 |
--- a/content/renderer/webcrypto/webcrypto_impl.cc |
+++ b/content/renderer/webcrypto/webcrypto_impl.cc |
@@ -194,4 +194,16 @@ void WebCryptoImpl::verifySignature(const blink::WebCryptoAlgorithm& algorithm, |
result.completeWithBoolean(signature_match); |
} |
+bool WebCryptoImpl::digestSynchronous( |
+ const blink::WebCryptoAlgorithmId algorithm_id, |
+ const unsigned char* data, |
+ unsigned int data_size, |
+ blink::WebArrayBuffer& result) { |
+ blink::WebCryptoAlgorithm algorithm = |
+ blink::WebCryptoAlgorithm::adoptParamsAndCreate(algorithm_id, NULL); |
+ return (webcrypto::Digest( |
+ algorithm, webcrypto::CryptoData(data, data_size), &result)) |
+ .IsSuccess(); |
+} |
+ |
} // namespace content |