Trait quinn::crypto::Keys [−][src]
Keys used to protect packet payloads
Associated Types
type HeaderKeys: HeaderKeys + Sized
[src]
Type used for header protection keys
Required methods
pub fn new_initial(id: &ConnectionId, side: Side) -> Self
[src]
Create the initial set of keys given the initial ConnectionId
pub fn encrypt(&self, packet: u64, buf: &mut [u8], header_len: usize)
[src]
Encrypt the packet payload with the given packet number
pub fn decrypt(
&self,
packet: u64,
header: &[u8],
payload: &mut BytesMut
) -> Result<(), ()>
[src]
&self,
packet: u64,
header: &[u8],
payload: &mut BytesMut
) -> Result<(), ()>
Decrypt the packet payload with the given packet number
pub fn header_keys(&self) -> Self::HeaderKeys
[src]
Derive the header protection keys from these packet protection keys
pub fn tag_len(&self) -> usize
[src]
The length of the AEAD tag appended to packets on encryption