Add support for Header Protection to QuicCrypter classes
gfe-relnote: no behavior change (adds unused methods to QuicCrypter classes)
PiperOrigin-RevId: 239293044
Change-Id: I0365ad92962102714787b44d346f5c698900ead9
diff --git a/quic/core/crypto/null_decrypter.cc b/quic/core/crypto/null_decrypter.cc
index 288d3c4..4934f62 100644
--- a/quic/core/crypto/null_decrypter.cc
+++ b/quic/core/crypto/null_decrypter.cc
@@ -28,6 +28,10 @@
return iv.empty();
}
+bool NullDecrypter::SetHeaderProtectionKey(QuicStringPiece key) {
+ return key.empty();
+}
+
bool NullDecrypter::SetPreliminaryKey(QuicStringPiece key) {
QUIC_BUG << "Should not be called";
return false;
@@ -66,6 +70,11 @@
return true;
}
+std::string NullDecrypter::GenerateHeaderProtectionMask(
+ QuicDataReader* sample_reader) {
+ return std::string(5, 0);
+}
+
size_t NullDecrypter::GetKeySize() const {
return 0;
}