pub struct AeadEncryptCtx(/* private fields */);Expand description
AEAD encryption context (GCM, CCM, ChaCha20-Poly1305).
Implementations§
Source§impl AeadEncryptCtx
impl AeadEncryptCtx
Sourcepub fn new(
alg: &CipherAlg,
key: &[u8],
iv: &[u8],
params: Option<&Params<'_>>,
) -> Result<Self, ErrorStack>
pub fn new( alg: &CipherAlg, key: &[u8], iv: &[u8], params: Option<&Params<'_>>, ) -> Result<Self, ErrorStack>
Sourcepub fn update(
&mut self,
input: &[u8],
output: &mut [u8],
) -> Result<usize, ErrorStack>
pub fn update( &mut self, input: &[u8], output: &mut [u8], ) -> Result<usize, ErrorStack>
Feed input into the AEAD cipher; write to output.
§Errors
Auto Trait Implementations§
impl Freeze for AeadEncryptCtx
impl RefUnwindSafe for AeadEncryptCtx
impl Send for AeadEncryptCtx
impl !Sync for AeadEncryptCtx
impl Unpin for AeadEncryptCtx
impl UnsafeUnpin for AeadEncryptCtx
impl UnwindSafe for AeadEncryptCtx
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