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

Unified Diff: crypto/encryptor.cc

Issue 7230037: Use base::StringPiece for input parameters in Encryptor, rather than std::string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 9 years, 6 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: crypto/encryptor.cc
diff --git a/crypto/encryptor.cc b/crypto/encryptor.cc
index 59988f8925ec054a5738339075f94db7bd5dee88..53e88f933f4ef206a044dc3956ed5b3d736b3dc7 100644
--- a/crypto/encryptor.cc
+++ b/crypto/encryptor.cc
@@ -34,7 +34,7 @@ namespace crypto {
/////////////////////////////////////////////////////////////////////////////
// Encyptor::Counter Implementation.
-Encryptor::Counter::Counter(const std::string& counter) {
+Encryptor::Counter::Counter(const base::StringPiece& counter) {
CHECK(sizeof(counter_) == counter.length());
memcpy(&counter_, counter.data(), sizeof(counter_));
@@ -70,7 +70,7 @@ size_t Encryptor::Counter::GetLengthInBytes() const {
/////////////////////////////////////////////////////////////////////////////
// Partial Encryptor Implementation.
-bool Encryptor::SetCounter(const std::string& counter) {
+bool Encryptor::SetCounter(const base::StringPiece& counter) {
if (mode_ != CTR)
return false;
if (counter.length() != 16u)
« no previous file with comments | « crypto/encryptor.h ('k') | crypto/encryptor_mac.cc » ('j') | crypto/encryptor_openssl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698