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

Unified Diff: crypto/symmetric_key_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/symmetric_key_openssl.cc ('k') | crypto/third_party/nss/secsign.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/symmetric_key_win.cc
diff --git a/crypto/symmetric_key_win.cc b/crypto/symmetric_key_win.cc
index efc7fe4b8269b78ca46d1ab6b1795fc8157e7b3f..ac8e614e514f099847a2656691ac93380528fa93 100644
--- a/crypto/symmetric_key_win.cc
+++ b/crypto/symmetric_key_win.cc
@@ -4,6 +4,9 @@
#include "crypto/symmetric_key.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
// TODO(wtc): replace scoped_array by std::vector.
@@ -239,7 +242,7 @@ bool ComputePBKDF2Block(HCRYPTHASH hash,
DWORD hash_size,
const std::string& salt,
size_t iterations,
- uint32 block_index,
+ uint32_t block_index,
BYTE* output_buf) {
// From RFC 2898:
// 3. <snip> The function F is defined as the exclusive-or sum of the first
@@ -263,7 +266,7 @@ bool ComputePBKDF2Block(HCRYPTHASH hash,
return false;
// Iteration U_1: and append (big-endian) INT (i).
- uint32 big_endian_block_index = base::HostToNet32(block_index);
+ uint32_t big_endian_block_index = base::HostToNet32(block_index);
ok = CryptHashData(safe_hash,
reinterpret_cast<BYTE*>(&big_endian_block_index),
sizeof(big_endian_block_index), 0);
@@ -440,7 +443,7 @@ SymmetricKey* SymmetricKey::DeriveKeyFromPassword(Algorithm algorithm,
// 4. Concatenate the blocks and extract the first dkLen octets to produce
// a derived key DK:
// DK = T_1 || T_2 || ... || T_l<0..r-1>
- for (uint32 block_index = 1; block_index <= L; ++block_index) {
+ for (uint32_t block_index = 1; block_index <= L; ++block_index) {
if (!ComputePBKDF2Block(prf, hLen, salt, iterations, block_index,
block_offset))
return NULL;
« no previous file with comments | « crypto/symmetric_key_openssl.cc ('k') | crypto/third_party/nss/secsign.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698