#[non_exhaustive]pub enum DecryptionContext {
Iv128(FixedLength<IV_LEN_128_BIT>),
Iv64(FixedLength<IV_LEN_64_BIT>),
None,
}Expand description
The contextual data used to encrypt or decrypt data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Iv128(FixedLength<IV_LEN_128_BIT>)
A 128-bit Initialization Vector.
Iv64(FixedLength<IV_LEN_64_BIT>)
Available on crate feature
legacy-des only.A 64-bit Initialization Vector.
Used by DES and 3DES in CBC mode only. ECB mode uses
Self::None regardless of the cipher’s block size, and
no other cipher in this crate produces or consumes a 64-bit IV.
None
No Cipher Context
Trait Implementations§
Source§impl Debug for DecryptionContext
impl Debug for DecryptionContext
Source§impl From<DecryptionContext> for EncryptionContext
impl From<DecryptionContext> for EncryptionContext
Source§fn from(value: DecryptionContext) -> Self
fn from(value: DecryptionContext) -> Self
Converts to this type from the input type.
Source§impl From<EncryptionContext> for DecryptionContext
impl From<EncryptionContext> for DecryptionContext
Source§fn from(value: EncryptionContext) -> Self
fn from(value: EncryptionContext) -> Self
Converts to this type from the input type.
Source§impl<'a> TryFrom<&'a DecryptionContext> for &'a [u8]
impl<'a> TryFrom<&'a DecryptionContext> for &'a [u8]
Source§type Error = Unspecified
type Error = Unspecified
The type returned in the event of a conversion error.
Source§fn try_from(value: &'a DecryptionContext) -> Result<Self, Unspecified>
fn try_from(value: &'a DecryptionContext) -> Result<Self, Unspecified>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for DecryptionContext
impl RefUnwindSafe for DecryptionContext
impl Send for DecryptionContext
impl Sync for DecryptionContext
impl Unpin for DecryptionContext
impl UnsafeUnpin 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