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

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

Issue 2740453006: Add QuicStringPiece which is actually StringPiece. (Closed)
Patch Set: fix compile error and rebase Created 3 years, 9 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/core/crypto/crypto_server_test.cc ('k') | net/quic/core/crypto/crypto_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/crypto_utils.h
diff --git a/net/quic/core/crypto/crypto_utils.h b/net/quic/core/crypto/crypto_utils.h
index e956e885dacc34af66acc9b43ddbb2edd5c16d1f..c95e7c2734f88c755c0bd200de7438b4fdca95bd 100644
--- a/net/quic/core/crypto/crypto_utils.h
+++ b/net/quic/core/crypto/crypto_utils.h
@@ -12,13 +12,13 @@
#include <string>
#include "base/macros.h"
-#include "base/strings/string_piece.h"
#include "net/quic/core/crypto/crypto_handshake.h"
#include "net/quic/core/crypto/crypto_handshake_message.h"
#include "net/quic/core/crypto/crypto_protocol.h"
#include "net/quic/core/quic_packets.h"
#include "net/quic/core/quic_time.h"
#include "net/quic/platform/api/quic_export.h"
+#include "net/quic/platform/api/quic_string_piece.h"
namespace net {
@@ -74,7 +74,7 @@ class QUIC_EXPORT_PRIVATE CryptoUtils {
// <20 bytes> random
static void GenerateNonce(QuicWallTime now,
QuicRandom* random_generator,
- base::StringPiece orbit,
+ QuicStringPiece orbit,
std::string* nonce);
// DeriveKeys populates |crypters->encrypter|, |crypters->decrypter|, and
@@ -93,10 +93,10 @@ class QUIC_EXPORT_PRIVATE CryptoUtils {
// decrypter will only be keyed to a preliminary state: a call to
// |SetDiversificationNonce| with a diversification nonce will be needed to
// complete keying.
- static bool DeriveKeys(base::StringPiece premaster_secret,
+ static bool DeriveKeys(QuicStringPiece premaster_secret,
QuicTag aead,
- base::StringPiece client_nonce,
- base::StringPiece server_nonce,
+ QuicStringPiece client_nonce,
+ QuicStringPiece server_nonce,
const std::string& hkdf_input,
Perspective perspective,
Diversification diversification,
@@ -107,15 +107,15 @@ class QUIC_EXPORT_PRIVATE CryptoUtils {
// dependent on |subkey_secret|, |label|, and |context|. Returns false if the
// parameters are invalid (e.g. |label| contains null bytes); returns true on
// success.
- static bool ExportKeyingMaterial(base::StringPiece subkey_secret,
- base::StringPiece label,
- base::StringPiece context,
+ static bool ExportKeyingMaterial(QuicStringPiece subkey_secret,
+ QuicStringPiece label,
+ QuicStringPiece context,
size_t result_len,
std::string* result);
// Computes the FNV-1a hash of the provided DER-encoded cert for use in the
// XLCT tag.
- static uint64_t ComputeLeafCertHash(base::StringPiece cert);
+ static uint64_t ComputeLeafCertHash(QuicStringPiece cert);
// Validates that |server_hello| is actually an SHLO message and that it is
// not part of a downgrade attack.
« no previous file with comments | « net/quic/core/crypto/crypto_server_test.cc ('k') | net/quic/core/crypto/crypto_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698