pub(crate) struct PacketKey {
key: LessSafeKey,
iv: Iv,
confidentiality_limit: u64,
integrity_limit: u64,
}Fields§
§key: LessSafeKeyEncrypts or decrypts a packet’s payload
iv: IvComputes unique nonces for each packet
confidentiality_limit: u64Confidentiality limit (see quic::PacketKey::confidentiality_limit)
integrity_limit: u64Integrity limit (see quic::PacketKey::integrity_limit)
Implementations§
Trait Implementations§
Source§impl PacketKey for PacketKey
impl PacketKey for PacketKey
Source§fn decrypt_in_place<'a>(
&self,
packet_number: u64,
header: &[u8],
payload: &'a mut [u8],
) -> Result<&'a [u8], Error>
fn decrypt_in_place<'a>( &self, packet_number: u64, header: &[u8], payload: &'a mut [u8], ) -> Result<&'a [u8], Error>
Decrypt a QUIC packet
Takes the packet header, which is used as the additional authenticated data, and the
payload, which includes the authentication tag.
If the return value is Ok, the decrypted payload can be found in payload, up to the
length found in the return value.
Source§fn confidentiality_limit(&self) -> u64
fn confidentiality_limit(&self) -> u64
Confidentiality limit (see quic::PacketKey::confidentiality_limit)
Source§fn integrity_limit(&self) -> u64
fn integrity_limit(&self) -> u64
Integrity limit (see quic::PacketKey::integrity_limit)
Source§fn encrypt_in_place(
&self,
packet_number: u64,
header: &[u8],
payload: &mut [u8],
) -> Result<Tag, Error>
fn encrypt_in_place( &self, packet_number: u64, header: &[u8], payload: &mut [u8], ) -> Result<Tag, Error>
Encrypt a QUIC packet Read more
Auto Trait Implementations§
impl Freeze for PacketKey
impl RefUnwindSafe for PacketKey
impl Send for PacketKey
impl Sync for PacketKey
impl Unpin for PacketKey
impl UnwindSafe for PacketKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more