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

Unified Diff: components/webcrypto/webcrypto_impl.h

Issue 2160943003: Transfer WebCrypto databuffers across the Blink API using blink::WebVector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/test_helpers.cc ('k') | components/webcrypto/webcrypto_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/webcrypto_impl.h
diff --git a/components/webcrypto/webcrypto_impl.h b/components/webcrypto/webcrypto_impl.h
index b551213351ff01d4440f8d17cf6569a1f810f968..20de3ed802dd6d78eba42e05ed7ae06fb5178283 100644
--- a/components/webcrypto/webcrypto_impl.h
+++ b/components/webcrypto/webcrypto_impl.h
@@ -27,25 +27,21 @@ class WebCryptoImpl : public blink::WebCrypto {
void encrypt(const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
- const unsigned char* data,
- unsigned int data_size,
+ blink::WebVector<unsigned char> data,
blink::WebCryptoResult result) override;
void decrypt(const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
- const unsigned char* data,
- unsigned int data_size,
+ blink::WebVector<unsigned char> data,
blink::WebCryptoResult result) override;
void digest(const blink::WebCryptoAlgorithm& algorithm,
- const unsigned char* data,
- unsigned int data_size,
+ blink::WebVector<unsigned char> data,
blink::WebCryptoResult result) override;
void generateKey(const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
blink::WebCryptoKeyUsageMask usages,
blink::WebCryptoResult result) override;
void importKey(blink::WebCryptoKeyFormat format,
- const unsigned char* key_data,
- unsigned int key_data_size,
+ blink::WebVector<unsigned char> key_data,
const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
blink::WebCryptoKeyUsageMask usages,
@@ -55,15 +51,12 @@ class WebCryptoImpl : public blink::WebCrypto {
blink::WebCryptoResult result) override;
void sign(const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
- const unsigned char* data,
- unsigned int data_size,
+ blink::WebVector<unsigned char> data,
blink::WebCryptoResult result) override;
void verifySignature(const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
- const unsigned char* signature,
- unsigned int signature_size,
- const unsigned char* data,
- unsigned int data_size,
+ blink::WebVector<unsigned char> signature,
+ blink::WebVector<unsigned char> data,
blink::WebCryptoResult result) override;
void wrapKey(blink::WebCryptoKeyFormat format,
const blink::WebCryptoKey& key,
@@ -71,8 +64,7 @@ class WebCryptoImpl : public blink::WebCrypto {
const blink::WebCryptoAlgorithm& wrap_algorithm,
blink::WebCryptoResult result) override;
void unwrapKey(blink::WebCryptoKeyFormat format,
- const unsigned char* wrapped_key,
- unsigned wrapped_key_size,
+ blink::WebVector<unsigned char> wrapped_key,
const blink::WebCryptoKey& wrapping_key,
const blink::WebCryptoAlgorithm& unwrap_algorithm,
const blink::WebCryptoAlgorithm& unwrapped_key_algorithm,
« no previous file with comments | « components/webcrypto/algorithms/test_helpers.cc ('k') | components/webcrypto/webcrypto_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698