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

Unified Diff: crypto/hkdf.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/hkdf.h ('k') | crypto/hkdf_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/hkdf.cc
diff --git a/crypto/hkdf.cc b/crypto/hkdf.cc
index 82aae24679e45ab8ca9dd2acbc2b0a809a48f543..67c39216b9653e535c7176a2eb9cc9faa6c22649 100644
--- a/crypto/hkdf.cc
+++ b/crypto/hkdf.cc
@@ -4,6 +4,9 @@
#include "crypto/hkdf.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "crypto/hmac.h"
@@ -34,7 +37,7 @@ HKDF::HKDF(const base::StringPiece& secret,
DCHECK(result);
// |prk| is a pseudorandom key (of kSHA256HashLength octets).
- uint8 prk[kSHA256HashLength];
+ uint8_t prk[kSHA256HashLength];
DCHECK_EQ(sizeof(prk), prk_hmac.DigestLength());
result = prk_hmac.Sign(secret, prk, sizeof(prk));
DCHECK(result);
@@ -53,7 +56,7 @@ HKDF::HKDF(const base::StringPiece& secret,
base::StringPiece previous;
scoped_ptr<char[]> buf(new char[kSHA256HashLength + info.size() + 1]);
- uint8 digest[kSHA256HashLength];
+ uint8_t digest[kSHA256HashLength];
HMAC hmac(HMAC::SHA256);
result = hmac.Init(prk, sizeof(prk));
« no previous file with comments | « crypto/hkdf.h ('k') | crypto/hkdf_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698