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

Side by Side Diff: crypto/hmac_win.cc

Issue 1539353003: Switch to standard integer types in crypto/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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/hmac_unittest.cc ('k') | crypto/mac_security_services_lock.cc » ('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 <windows.h> 7 #include <windows.h>
8 #include <stddef.h>
8 9
9 #include <algorithm> 10 #include <algorithm>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "crypto/scoped_capi_types.h" 14 #include "crypto/scoped_capi_types.h"
14 #include "crypto/third_party/nss/chromium-blapi.h" 15 #include "crypto/third_party/nss/chromium-blapi.h"
15 #include "crypto/third_party/nss/chromium-sha256.h" 16 #include "crypto/third_party/nss/chromium-sha256.h"
16 #include "crypto/wincrypt_shim.h" 17 #include "crypto/wincrypt_shim.h"
17 18
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 201
201 if (!CryptHashData(hash, reinterpret_cast<const BYTE*>(data.data()), 202 if (!CryptHashData(hash, reinterpret_cast<const BYTE*>(data.data()),
202 static_cast<DWORD>(data.size()), 0)) 203 static_cast<DWORD>(data.size()), 0))
203 return false; 204 return false;
204 205
205 DWORD sha1_size = static_cast<DWORD>(digest_length); 206 DWORD sha1_size = static_cast<DWORD>(digest_length);
206 return !!CryptGetHashParam(hash, HP_HASHVAL, digest, &sha1_size, 0); 207 return !!CryptGetHashParam(hash, HP_HASHVAL, digest, &sha1_size, 0);
207 } 208 }
208 209
209 } // namespace crypto 210 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/hmac_unittest.cc ('k') | crypto/mac_security_services_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698