pub struct Aead { /* private fields */ }
Implementations§
Methods from Deref<Target = Cipher>§
Sourcepub fn nid(&self) -> Nid
pub fn nid(&self) -> Nid
Returns the cipher’s Nid.
This corresponds to EVP_CIPHER_nid
.
pub fn as_ptr(&self) -> *const EVP_CIPHER
Sourcepub fn iv_len(&self) -> Option<usize>
pub fn iv_len(&self) -> Option<usize>
Returns the length of the IV used with this cipher, or None
if the
cipher does not use an IV.
Sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
Trait Implementations§
Source§impl AeadType for Aead
impl AeadType for Aead
type Error = AeadError
fn seal<'a>( &self, key: &[u8], data: &[u8], aad: Option<&'a [u8]>, nonce: &[u8], ) -> Result<Vec<u8>, AeadError>
fn open<'a>( &self, key: &[u8], ciphertext: &[u8], aad: Option<&'a [u8]>, nonce: &[u8], ) -> Result<Vec<u8>, AeadError>
fn key_size(&self) -> usize
fn nonce_size(&self) -> usize
fn aead_id(&self) -> u16
Auto Trait Implementations§
impl Freeze for Aead
impl RefUnwindSafe for Aead
impl Send for Aead
impl Sync for Aead
impl Unpin for Aead
impl UnwindSafe for Aead
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more