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

Unified Diff: third_party/WebKit/public/platform/WebCrypto.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
Index: third_party/WebKit/public/platform/WebCrypto.h
diff --git a/third_party/WebKit/public/platform/WebCrypto.h b/third_party/WebKit/public/platform/WebCrypto.h
index cfd49c5ad5a3c8072bc92b61d489d784d954ac48..ba3d98fa80b84d97ef133c85792cba2943508fe8 100644
--- a/third_party/WebKit/public/platform/WebCrypto.h
+++ b/third_party/WebKit/public/platform/WebCrypto.h
@@ -172,10 +172,8 @@ public:
// Inputs
// -----------------------
//
- // * Data buffers are passed as (basePointer, byteLength) pairs.
- // These buffers are only valid during the call itself. Asynchronous
- // implementations wishing to access it after the function returns
- // should make a copy.
+ // * Data buffers are transfered as WebVectors. Implementations are free
+ // to re-use or transfer their storage.
//
// * All WebCryptoKeys are guaranteeed to be !isNull().
//
@@ -200,16 +198,16 @@ public:
// * The key usages permit the operation being requested.
// * The key's algorithm matches that of the requested operation.
//
- virtual void encrypt(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, unsigned dataSize, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
- virtual void decrypt(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, unsigned dataSize, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
- virtual void sign(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, unsigned dataSize, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
- virtual void verifySignature(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* signature, unsigned signatureSize, const unsigned char* data, unsigned dataSize, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
- virtual void digest(const WebCryptoAlgorithm&, const unsigned char* data, unsigned dataSize, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
+ virtual void encrypt(const WebCryptoAlgorithm&, const WebCryptoKey&, WebVector<unsigned char> data, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
+ virtual void decrypt(const WebCryptoAlgorithm&, const WebCryptoKey&, WebVector<unsigned char> data, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
+ virtual void sign(const WebCryptoAlgorithm&, const WebCryptoKey&, WebVector<unsigned char> data, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
+ virtual void verifySignature(const WebCryptoAlgorithm&, const WebCryptoKey&, WebVector<unsigned char> signature, WebVector<unsigned char> data, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
+ virtual void digest(const WebCryptoAlgorithm&, WebVector<unsigned char> data, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
virtual void generateKey(const WebCryptoAlgorithm&, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
- virtual void importKey(WebCryptoKeyFormat, const unsigned char* keyData, unsigned keyDataSize, const WebCryptoAlgorithm&, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
+ virtual void importKey(WebCryptoKeyFormat, WebVector<unsigned char> keyData, const WebCryptoAlgorithm&, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
virtual void exportKey(WebCryptoKeyFormat, const WebCryptoKey&, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
virtual void wrapKey(WebCryptoKeyFormat, const WebCryptoKey& key, const WebCryptoKey& wrappingKey, const WebCryptoAlgorithm&, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
- virtual void unwrapKey(WebCryptoKeyFormat, const unsigned char* wrappedKey, unsigned wrappedKeySize, const WebCryptoKey&, const WebCryptoAlgorithm& unwrapAlgorithm, const WebCryptoAlgorithm& unwrappedKeyAlgorithm, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
+ virtual void unwrapKey(WebCryptoKeyFormat, WebVector<unsigned char> wrappedKey, const WebCryptoKey&, const WebCryptoAlgorithm& unwrapAlgorithm, const WebCryptoAlgorithm& unwrappedKeyAlgorithm, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
virtual void deriveBits(const WebCryptoAlgorithm&, const WebCryptoKey&, unsigned length, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }
virtual void deriveKey(const WebCryptoAlgorithm& algorithm, const WebCryptoKey& baseKey, const WebCryptoAlgorithm& importAlgorithm, const WebCryptoAlgorithm& keyLengthAlgorithm, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult result) { result.completeWithError(WebCryptoErrorTypeNotSupported, ""); }

Powered by Google App Engine
This is Rietveld 408576698