pub struct DecryptionContext(/* private fields */);Expand description
A block cipher state and AEAD mode for decryption.
Implementations§
Source§impl DecryptionContext
impl DecryptionContext
Sourcepub fn decrypt_verify(&mut self, dst: &mut [u8], src: &[u8]) -> Result<()>
pub fn decrypt_verify(&mut self, dst: &mut [u8], src: &[u8]) -> Result<()>
Decrypts src to dst.
Decrypts the given plaintext, and checks the authentication tag. If the authentication tag is not correct, an error is returned.
src contains both the ciphertext and the digest, i.e. its
length must be exactly dst.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 DecryptionContext
impl !RefUnwindSafe for DecryptionContext
impl !Send for DecryptionContext
impl !Sync for DecryptionContext
impl Unpin for DecryptionContext
impl !UnwindSafe for DecryptionContext
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