#[non_exhaustive]pub enum EncryptionScheme<'a> {
Aes128Cbc {
iv: &'a [u8; 16],
},
Aes192Cbc {
iv: &'a [u8; 16],
},
Aes256Cbc {
iv: &'a [u8; 16],
},
}Expand description
Symmetric encryption scheme used by PBES2.
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.
Implementations§
Source§impl<'a> EncryptionScheme<'a>
impl<'a> EncryptionScheme<'a>
Sourcepub fn oid(&self) -> ObjectIdentifier
pub fn oid(&self) -> ObjectIdentifier
Get the ObjectIdentifier (a.k.a OID) for this algorithm.
Sourcepub fn to_alg_params_invalid(&self) -> Error
pub fn to_alg_params_invalid(&self) -> Error
Convenience function to turn the OID (see oid)
of this EncryptionScheme into error case
Error::AlgorithmParametersInvalid
Trait Implementations§
Source§impl<'a> Clone for EncryptionScheme<'a>
impl<'a> Clone for EncryptionScheme<'a>
Source§fn clone(&self) -> EncryptionScheme<'a>
fn clone(&self) -> EncryptionScheme<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for EncryptionScheme<'a>
impl<'a> Debug for EncryptionScheme<'a>
Source§impl<'a> Decode<'a> for EncryptionScheme<'a>
impl<'a> Decode<'a> for EncryptionScheme<'a>
Source§impl<'a> Encode for EncryptionScheme<'a>
impl<'a> Encode for EncryptionScheme<'a>
Source§fn encoded_len(&self) -> Result<Length>
fn encoded_len(&self) -> Result<Length>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<()>
fn encode(&self, writer: &mut impl Writer) -> Result<()>
Encode this value as ASN.1 DER using the provided
Writer.Source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.
Source§impl<'a> PartialEq for EncryptionScheme<'a>
impl<'a> PartialEq for EncryptionScheme<'a>
Source§impl<'a> TryFrom<AlgorithmIdentifier<AnyRef<'a>>> for EncryptionScheme<'a>
impl<'a> TryFrom<AlgorithmIdentifier<AnyRef<'a>>> for EncryptionScheme<'a>
Source§impl<'a> TryFrom<EncryptionScheme<'a>> for AlgorithmIdentifierRef<'a>
impl<'a> TryFrom<EncryptionScheme<'a>> for AlgorithmIdentifierRef<'a>
impl<'a> Copy for EncryptionScheme<'a>
impl<'a> Eq for EncryptionScheme<'a>
impl<'a> StructuralPartialEq for EncryptionScheme<'a>
Auto Trait Implementations§
impl<'a> Freeze for EncryptionScheme<'a>
impl<'a> RefUnwindSafe for EncryptionScheme<'a>
impl<'a> Send for EncryptionScheme<'a>
impl<'a> Sync for EncryptionScheme<'a>
impl<'a> Unpin for EncryptionScheme<'a>
impl<'a> UnsafeUnpin for EncryptionScheme<'a>
impl<'a> UnwindSafe for EncryptionScheme<'a>
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