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

Unified Diff: base/md5.h

Issue 7466003: MD5Update function uses StringPiece instead of raw buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved to StringPiece Created 9 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 | « no previous file | base/md5.cc » ('j') | base/md5.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/md5.h
diff --git a/base/md5.h b/base/md5.h
index a31732995668acb5ff5c363dafe125378326dfcf..a5af271c5e39a9c0f947b50692ae7a72cfb84c1e 100644
--- a/base/md5.h
+++ b/base/md5.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/base_api.h"
+#include "base/string_piece.h"
namespace base {
@@ -52,10 +53,10 @@ BASE_API void MD5Sum(const void* data, size_t length, MD5Digest* digest);
// MD5Update().
BASE_API void MD5Init(MD5Context* context);
-// For the given buffer of data, updates the given MD5 context with the sum of
-// the data. You can call this any number of times during the computation,
-// except that MD5Init() must have been called first.
-BASE_API void MD5Update(MD5Context* context, const void* data, size_t length);
+// For the given buffer of |data| as a StringPiece, updates the given MD5
+// context with the sum of the data. You can call this any number of times
+// during the computation, except that MD5Init() must have been called first.
+BASE_API void MD5Update(MD5Context* context, const StringPiece& data);
// Finalizes the MD5 operation and fills the buffer with the digest.
BASE_API void MD5Final(MD5Digest* digest, MD5Context* context);
« no previous file with comments | « no previous file | base/md5.cc » ('j') | base/md5.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698