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

Side by Side Diff: crypto/hmac.cc

Issue 2677583002: Fix non-noise cpplint errors in //crypto. (Closed)
Patch Set: fix p224_unittest.cc Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « crypto/encryptor_unittest.cc ('k') | crypto/mock_apple_keychain.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crypto/hmac.h" 5 #include "crypto/hmac.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string>
10 11
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/stl_util.h" 13 #include "base/stl_util.h"
13 #include "crypto/openssl_util.h" 14 #include "crypto/openssl_util.h"
14 #include "crypto/secure_util.h" 15 #include "crypto/secure_util.h"
15 #include "crypto/symmetric_key.h" 16 #include "crypto/symmetric_key.h"
16 #include "third_party/boringssl/src/include/openssl/hmac.h" 17 #include "third_party/boringssl/src/include/openssl/hmac.h"
17 18
18 namespace crypto { 19 namespace crypto {
19 20
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 std::unique_ptr<unsigned char[]> computed_digest( 85 std::unique_ptr<unsigned char[]> computed_digest(
85 new unsigned char[digest_length]); 86 new unsigned char[digest_length]);
86 if (!Sign(data, computed_digest.get(), digest_length)) 87 if (!Sign(data, computed_digest.get(), digest_length))
87 return false; 88 return false;
88 89
89 return SecureMemEqual(digest.data(), computed_digest.get(), 90 return SecureMemEqual(digest.data(), computed_digest.get(),
90 std::min(digest.size(), digest_length)); 91 std::min(digest.size(), digest_length));
91 } 92 }
92 93
93 } // namespace crypto 94 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/encryptor_unittest.cc ('k') | crypto/mock_apple_keychain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698