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

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

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/crypto/crypto_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_utils.h
diff --git a/net/quic/crypto/crypto_utils.h b/net/quic/crypto/crypto_utils.h
index 442830b5cb55ce8447672b2740cb665ee990a907..4ad41495a8f508bed0be2c2fc2e14f28aba65c5a 100644
--- a/net/quic/crypto/crypto_utils.h
+++ b/net/quic/crypto/crypto_utils.h
@@ -16,7 +16,7 @@
namespace net {
-class QuicClock;
+class QuicTime;
class QuicRandom;
struct QuicCryptoNegotiatedParameters;
@@ -51,17 +51,19 @@ class NET_EXPORT_PRIVATE CryptoUtils {
// <4 bytes> current time
// <8 bytes> |orbit| (or random if |orbit| is empty)
// <20 bytes> random
- static void GenerateNonce(const QuicClock* clock,
+ static void GenerateNonce(QuicTime::Delta now,
QuicRandom* random_generator,
- const std::string& orbit,
+ base::StringPiece orbit,
std::string* nonce);
- // DeriveKeys populates the |encrypter| and |decrypter| members of |params|
- // given the contents of |premaster_secret|, |nonce| and |hkdf_input|.
- // |perspective| controls whether the server's keys are assigned to
- // |encrypter| or |decrypter|.
+ // DeriveKeys populates |params->encrypter| and |params->decrypter| given the
+ // contents of |params->premaster_secret|, |client_nonce|,
+ // |params->server_nonce| and |hkdf_input|. |perspective| controls whether
+ // the server's keys are assigned to |encrypter| or |decrypter|.
+ // |params->server_nonce| is optional and, if non-empty, is mixed into the
+ // key derivation.
static void DeriveKeys(QuicCryptoNegotiatedParameters* params,
- base::StringPiece nonce,
+ base::StringPiece client_nonce,
const std::string& hkdf_input,
Perspective perspective);
};
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/crypto/crypto_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698