pub struct EncryptionContext(/* private fields */);Expand description
A block cipher state and AEAD mode for encryption.
Implementations§
Source§impl EncryptionContext
impl EncryptionContext
Sourcepub fn encrypt_seal(&mut self, dst: &mut [u8], src: &[u8]) -> Result<()>
pub fn encrypt_seal(&mut self, dst: &mut [u8], src: &[u8]) -> Result<()>
Encrypts src to dst.
Encrypts the given plaintext, and adds an authentication tag.
dst must be exactly large enough to accommodate both the
ciphertext and the digest, i.e. its length must be exactly
src.len() + self.digest_size().
Sourcepub fn digest_size(&self) -> usize
pub fn digest_size(&self) -> usize
Length of the digest in bytes.
Auto Trait Implementations§
impl Freeze for EncryptionContext
impl !RefUnwindSafe for EncryptionContext
impl !Send for EncryptionContext
impl !Sync for EncryptionContext
impl Unpin for EncryptionContext
impl !UnwindSafe for EncryptionContext
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