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_encrypter.cc b/quic/core/crypto/null_encrypter.cc
index 9819a31..69db96d 100644
--- a/quic/core/crypto/null_encrypter.cc
+++ b/quic/core/crypto/null_encrypter.cc
@@ -26,6 +26,10 @@
return iv.empty();
}
+bool NullEncrypter::SetHeaderProtectionKey(QuicStringPiece key) {
+ return key.empty();
+}
+
bool NullEncrypter::EncryptPacket(uint64_t /*packet_number*/,
QuicStringPiece associated_data,
QuicStringPiece plaintext,
@@ -53,6 +57,11 @@
return true;
}
+std::string NullEncrypter::GenerateHeaderProtectionMask(
+ QuicStringPiece sample) {
+ return std::string(5, 0);
+}
+
size_t NullEncrypter::GetKeySize() const {
return 0;
}