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

Unified Diff: crypto/hmac.cc

Issue 2095523002: Make //crypto factories return std::unique_ptr<>s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: I'm blind Created 4 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
« no previous file with comments | « crypto/encryptor.cc ('k') | crypto/hmac_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/hmac.cc
diff --git a/crypto/hmac.cc b/crypto/hmac.cc
index c3c43da84e5c7f1265fff7bb81f431b570c18761..fa91628e33bac62c94a2247b6ddad327a785ed8d 100644
--- a/crypto/hmac.cc
+++ b/crypto/hmac.cc
@@ -63,10 +63,10 @@ bool HMAC::Sign(const base::StringPiece& data,
DCHECK(initialized_);
ScopedOpenSSLSafeSizeBuffer<EVP_MAX_MD_SIZE> result(digest, digest_length);
- return !!::HMAC(hash_alg_ == SHA1 ? EVP_sha1() : EVP_sha256(),
- key_.data(), key_.size(),
+ return !!::HMAC(hash_alg_ == SHA1 ? EVP_sha1() : EVP_sha256(), key_.data(),
+ key_.size(),
reinterpret_cast<const unsigned char*>(data.data()),
- data.size(), result.safe_buffer(), NULL);
+ data.size(), result.safe_buffer(), nullptr);
}
bool HMAC::Verify(const base::StringPiece& data,
« no previous file with comments | « crypto/encryptor.cc ('k') | crypto/hmac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698