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

Unified Diff: public/platform/WebCrypto.h

Issue 23537027: WebCrypto: [refactor] Use "unsigned" rather than "size_t" for buffer sizes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add an ifdef to coordinate with chromium side Created 7 years, 3 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 | « Source/testing/runner/MockWebCrypto.cpp ('k') | public/platform/WebCryptoAlgorithmParams.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebCrypto.h
diff --git a/public/platform/WebCrypto.h b/public/platform/WebCrypto.h
index 70e10f1dfaa8bb3190addf9d6b53e375e132127e..c39c59bc4f6f6a70f76fc53d1bac1718cae22828 100644
--- a/public/platform/WebCrypto.h
+++ b/public/platform/WebCrypto.h
@@ -37,6 +37,9 @@
namespace WebCore { class CryptoResult; }
+// FIXME: delete once chromium side has been updated.
+#define WEBCRYPTO_DIGEST_LENGTH_IS_UINT
+
#if WEBKIT_IMPLEMENTATION
namespace WTF { template <typename T> class PassRefPtr; }
#endif
@@ -65,7 +68,7 @@ public:
WEBKIT_EXPORT void completeWithError();
WEBKIT_EXPORT void completeWithBuffer(const WebArrayBuffer&);
- WEBKIT_EXPORT void completeWithBuffer(const void*, size_t);
+ WEBKIT_EXPORT void completeWithBuffer(const void*, unsigned);
WEBKIT_EXPORT void completeWithBoolean(bool);
WEBKIT_EXPORT void completeWithKey(const WebCryptoKey&);
WEBKIT_EXPORT void completeWithKeyPair(const WebCryptoKey& publicKey, const WebCryptoKey& privateKey);
@@ -90,13 +93,13 @@ public:
//
// The result should be set exactly once, from the same thread which
// initiated the operation.
- virtual void encrypt(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, size_t data_size, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void decrypt(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, size_t data_size, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void sign(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, size_t data_size, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void verifySignature(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* signature, size_t signature_size, const unsigned char* data, size_t data_size, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void digest(const WebCryptoAlgorithm&, const unsigned char* data, size_t data_size, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void encrypt(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, unsigned dataSize, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void decrypt(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, unsigned dataSize, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void sign(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* data, unsigned dataSize, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void verifySignature(const WebCryptoAlgorithm&, const WebCryptoKey&, const unsigned char* signature, unsigned signatureSize, const unsigned char* data, unsigned dataSize, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void digest(const WebCryptoAlgorithm&, const unsigned char* data, unsigned dataSize, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void generateKey(const WebCryptoAlgorithm&, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void importKey(WebCryptoKeyFormat, const unsigned char* keyData, size_t keyDataSize, const WebCryptoAlgorithm&, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void importKey(WebCryptoKeyFormat, const unsigned char* keyData, unsigned keyDataSize, const WebCryptoAlgorithm&, bool extractable, WebCryptoKeyUsageMask, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void exportKey(WebCryptoKeyFormat, const WebCryptoKey&, WebCryptoResult) { WEBKIT_ASSERT_NOT_REACHED(); }
protected:
« no previous file with comments | « Source/testing/runner/MockWebCrypto.cpp ('k') | public/platform/WebCryptoAlgorithmParams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698