Trait quinn_proto::crypto::PacketKey
source · [−]pub trait PacketKey: Send {
fn encrypt(&self, packet: u64, buf: &mut [u8], header_len: usize);
fn decrypt(
&self,
packet: u64,
header: &[u8],
payload: &mut BytesMut
) -> Result<(), CryptoError>;
fn tag_len(&self) -> usize;
fn confidentiality_limit(&self) -> u64;
fn integrity_limit(&self) -> u64;
}
Expand description
Keys used to protect packet payloads
Required Methods
Encrypt the packet payload with the given packet number
Decrypt the packet payload with the given packet number
fn confidentiality_limit(&self) -> u64
fn confidentiality_limit(&self) -> u64
Maximum number of packets that may be sent using a single key
fn integrity_limit(&self) -> u64
fn integrity_limit(&self) -> u64
Maximum number of incoming packets that may fail decryption before the connection must be abandoned