pub struct ChaCha8PacketKey(/* private fields */);Implementations§
Trait Implementations§
Source§impl Clone for ChaCha8PacketKey
impl Clone for ChaCha8PacketKey
Source§fn clone(&self) -> ChaCha8PacketKey
fn clone(&self) -> ChaCha8PacketKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl PacketKey for ChaCha8PacketKey
impl PacketKey for ChaCha8PacketKey
Source§fn encrypt(&self, packet: u64, buf: &mut [u8], header_len: usize)
fn encrypt(&self, packet: u64, buf: &mut [u8], header_len: usize)
Encrypt the packet payload with the given packet number
Source§fn decrypt(
&self,
packet: u64,
header: &[u8],
payload: &mut BytesMut,
) -> Result<(), CryptoError>
fn decrypt( &self, packet: u64, header: &[u8], payload: &mut BytesMut, ) -> Result<(), CryptoError>
Decrypt the packet payload with the given packet number
Source§fn confidentiality_limit(&self) -> u64
fn confidentiality_limit(&self) -> u64
Maximum number of packets that may be sent using a single key
Source§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
Auto Trait Implementations§
impl Freeze for ChaCha8PacketKey
impl RefUnwindSafe for ChaCha8PacketKey
impl Send for ChaCha8PacketKey
impl Sync for ChaCha8PacketKey
impl Unpin for ChaCha8PacketKey
impl UnwindSafe for ChaCha8PacketKey
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