pub struct PacketKey { /* private fields */ }Expand description
AEAD packet protection for one direction (RFC 9001 section 5.3).
Implementations§
Source§impl PacketKey
impl PacketKey
Sourcepub fn seal_in_place(
&self,
pn: u64,
header: &[u8],
payload: &mut [u8],
tag_out: &mut [u8; 16],
)
pub fn seal_in_place( &self, pn: u64, header: &[u8], payload: &mut [u8], tag_out: &mut [u8; 16], )
Encrypts payload in place; header is the unprotected header (the AAD).
Sourcepub fn open_in_place<'a>(
&self,
pn: u64,
header: &[u8],
payload_with_tag: &'a mut [u8],
) -> Result<&'a mut [u8]>
pub fn open_in_place<'a>( &self, pn: u64, header: &[u8], payload_with_tag: &'a mut [u8], ) -> Result<&'a mut [u8]>
Decrypts payload_with_tag in place and returns the plaintext part.
pub fn tag_len(&self) -> usize
Sourcepub fn confidentiality_limit(&self) -> u64
pub fn confidentiality_limit(&self) -> u64
Packets that may be encrypted under this key (RFC 9001 section 6.6).
Sourcepub fn integrity_limit(&self) -> u64
pub fn integrity_limit(&self) -> u64
Forged packets tolerated before the connection must close (RFC 9001 section 6.6).
Trait Implementations§
Auto Trait Implementations§
impl Forget for PacketKey
impl Freeze for PacketKey
impl Move for PacketKey
impl RefUnwindSafe for PacketKey
impl Send for PacketKey
impl Sync for PacketKey
impl Unpin for PacketKey
impl UnsafeUnpin 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