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

Unified Diff: net/quic/crypto/crypto_utils.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef 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 | « net/quic/crypto/crypto_utils.h ('k') | net/quic/crypto/curve25519_key_exchange.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_utils.cc
diff --git a/net/quic/crypto/crypto_utils.cc b/net/quic/crypto/crypto_utils.cc
index ae8c3194884231129d55ebe061b526349292b546..0c6a4a742f6f977469492d63efee8d6183fadabe 100644
--- a/net/quic/crypto/crypto_utils.cc
+++ b/net/quic/crypto/crypto_utils.cc
@@ -30,7 +30,7 @@ void CryptoUtils::GenerateNonce(QuicWallTime now,
nonce->reserve(kNonceSize);
nonce->resize(kNonceSize);
- uint32 gmt_unix_time = static_cast<uint32>(now.ToUNIXSeconds());
+ uint32_t gmt_unix_time = static_cast<uint32_t>(now.ToUNIXSeconds());
// The time in the nonce must be encoded in big-endian because the
// strike-register depends on the nonces being ordered by time.
(*nonce)[0] = static_cast<char>(gmt_unix_time >> 24);
@@ -140,11 +140,11 @@ bool CryptoUtils::ExportKeyingMaterial(StringPiece subkey_secret,
}
}
// Create HKDF info input: null-terminated label + length-prefixed context
- if (context.length() >= numeric_limits<uint32>::max()) {
+ if (context.length() >= numeric_limits<uint32_t>::max()) {
LOG(ERROR) << "Context value longer than 2^32";
return false;
}
- uint32 context_length = static_cast<uint32>(context.length());
+ uint32_t context_length = static_cast<uint32_t>(context.length());
string info = label.as_string();
info.push_back('\0');
info.append(reinterpret_cast<char*>(&context_length), sizeof(context_length));
@@ -157,7 +157,7 @@ bool CryptoUtils::ExportKeyingMaterial(StringPiece subkey_secret,
}
// static
-uint64 CryptoUtils::ComputeLeafCertHash(const std::string& cert) {
+uint64_t CryptoUtils::ComputeLeafCertHash(const std::string& cert) {
return QuicUtils::FNV1a_64_Hash(cert.data(), cert.size());
}
« no previous file with comments | « net/quic/crypto/crypto_utils.h ('k') | net/quic/crypto/curve25519_key_exchange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698