pub struct AesCcm { /* private fields */ }Expand description
AES-CCM with the RFC 3610 default parameters: L = 2, so
the nonce is 13 bytes and the maximum payload is 2^16 - 1
bytes. The tag length M is configurable per call.
This is the wrapper most callers want. The generic (M, L)
form is exposed via ccm_encrypt / ccm_decrypt for
protocols that need a different L.
Implementations§
Source§impl AesCcm
impl AesCcm
Sourcepub fn new(key: &[u8], m: usize) -> Option<Self>
pub fn new(key: &[u8], m: usize) -> Option<Self>
Initialise AES-CCM with M ∈ {4, 6, 8, 10, 12, 14, 16}.
Returns None for invalid M or invalid AES key length.
Auto Trait Implementations§
impl Freeze for AesCcm
impl RefUnwindSafe for AesCcm
impl Send for AesCcm
impl Sync for AesCcm
impl Unpin for AesCcm
impl UnsafeUnpin for AesCcm
impl UnwindSafe for AesCcm
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