diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-08 02:53:09 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-08 02:53:09 +0000 |
commit | 44a016a843efffc53256c862c792e53d7909c802 (patch) | |
tree | 57a31ad697342085bbdb29b2f9bcd3e5f5d58cce /crypto/encryptor.cc | |
parent | 98bc449977534905d2254d76686249e18603819e (diff) | |
download | chromium_src-44a016a843efffc53256c862c792e53d7909c802.zip chromium_src-44a016a843efffc53256c862c792e53d7909c802.tar.gz chromium_src-44a016a843efffc53256c862c792e53d7909c802.tar.bz2 |
Use base::StringPiece for input parameters in Encryptor, rather than std::string
R=wtc
BUG=none
TEST=crypto_unittests
Review URL: http://codereview.chromium.org/7230037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/encryptor.cc')
-rw-r--r-- | crypto/encryptor.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/encryptor.cc b/crypto/encryptor.cc index 59988f8..53e88f9 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) |