pub struct Aes256Ccm { /* private fields */ }Expand description
AES-256 CCM.
CCM authenticated encryption (NIST SP 800-38C, RFC 3610). The nonce is
7 to 13 bytes and the tag 4, 6, 8, 10, 12, 14 or 16 bytes; the tag
length is the length of the tag slice passed to each call. The
nonce must never repeat for a given key.
Implementations§
Source§impl Aes256Ccm
impl Aes256Ccm
Sourcepub fn encrypt(
&self,
nonce: &[u8],
aad: &[u8],
buf: &mut [u8],
tag: &mut [u8],
) -> Result<(), Error>
pub fn encrypt( &self, nonce: &[u8], aad: &[u8], buf: &mut [u8], tag: &mut [u8], ) -> Result<(), Error>
Encrypt buf in place, authenticating it and aad, writing the tag to tag.
Sourcepub fn encrypt_to(
&self,
nonce: &[u8],
aad: &[u8],
input: &[u8],
output: &mut [u8],
tag: &mut [u8],
) -> Result<(), Error>
pub fn encrypt_to( &self, nonce: &[u8], aad: &[u8], input: &[u8], output: &mut [u8], tag: &mut [u8], ) -> Result<(), Error>
Encrypt input to output, authenticating it and aad, writing the tag to tag.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Aes256Ccm
impl !Unpin for Aes256Ccm
impl !UnwindSafe for Aes256Ccm
impl Freeze for Aes256Ccm
impl Send for Aes256Ccm
impl Sync for Aes256Ccm
impl UnsafeUnpin for Aes256Ccm
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