| Index: net/quic/core/crypto/quic_decrypter.h
|
| diff --git a/net/quic/core/crypto/quic_decrypter.h b/net/quic/core/crypto/quic_decrypter.h
|
| index a47643ea8b7d503c5b7ce31d2e91cc9da11b6d2b..0b9a700a0af3dac60c857bc71fb93b4edb148dda 100644
|
| --- a/net/quic/core/crypto/quic_decrypter.h
|
| +++ b/net/quic/core/crypto/quic_decrypter.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "net/quic/core/quic_packets.h"
|
| #include "net/quic/platform/api/quic_export.h"
|
| +#include "net/quic/platform/api/quic_string_piece.h"
|
|
|
| namespace net {
|
|
|
| @@ -23,7 +24,7 @@ class QUIC_EXPORT_PRIVATE QuicDecrypter {
|
| //
|
| // NOTE: The key is the client_write_key or server_write_key derived from
|
| // the master secret.
|
| - virtual bool SetKey(base::StringPiece key) = 0;
|
| + virtual bool SetKey(QuicStringPiece key) = 0;
|
|
|
| // Sets the fixed initial bytes of the nonce. Returns true on success,
|
| // false on failure.
|
| @@ -40,7 +41,7 @@ class QUIC_EXPORT_PRIVATE QuicDecrypter {
|
| //
|
| // The security of the nonce format requires that QUIC never reuse a
|
| // packet number, even when retransmitting a lost packet.
|
| - virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) = 0;
|
| + virtual bool SetNoncePrefix(QuicStringPiece nonce_prefix) = 0;
|
|
|
| // Sets the encryption key. Returns true on success, false on failure.
|
| // |DecryptPacket| may not be called until |SetDiversificationNonce| is
|
| @@ -49,7 +50,7 @@ class QUIC_EXPORT_PRIVATE QuicDecrypter {
|
| //
|
| // If this function is called, neither |SetKey| nor |SetNoncePrefix| may be
|
| // called.
|
| - virtual bool SetPreliminaryKey(base::StringPiece key) = 0;
|
| + virtual bool SetPreliminaryKey(QuicStringPiece key) = 0;
|
|
|
| // SetDiversificationNonce uses |nonce| to derive final keys based on the
|
| // input keying material given by calling |SetPreliminaryKey|.
|
| @@ -68,8 +69,8 @@ class QUIC_EXPORT_PRIVATE QuicDecrypter {
|
| // to non-authentic inputs, as opposed to other reasons for failure.
|
| virtual bool DecryptPacket(QuicVersion version,
|
| QuicPacketNumber packet_number,
|
| - base::StringPiece associated_data,
|
| - base::StringPiece ciphertext,
|
| + QuicStringPiece associated_data,
|
| + QuicStringPiece ciphertext,
|
| char* output,
|
| size_t* output_length,
|
| size_t max_output_length) = 0;
|
| @@ -81,11 +82,11 @@ class QUIC_EXPORT_PRIVATE QuicDecrypter {
|
| virtual uint32_t cipher_id() const = 0;
|
|
|
| // For use by unit tests only.
|
| - virtual base::StringPiece GetKey() const = 0;
|
| - virtual base::StringPiece GetNoncePrefix() const = 0;
|
| + virtual QuicStringPiece GetKey() const = 0;
|
| + virtual QuicStringPiece GetNoncePrefix() const = 0;
|
|
|
| - static void DiversifyPreliminaryKey(base::StringPiece preliminary_key,
|
| - base::StringPiece nonce_prefix,
|
| + static void DiversifyPreliminaryKey(QuicStringPiece preliminary_key,
|
| + QuicStringPiece nonce_prefix,
|
| const DiversificationNonce& nonce,
|
| size_t key_size,
|
| size_t nonce_prefix_size,
|
|
|