Enum pkcs5::EncryptionScheme[][src]

#[non_exhaustive]pub enum EncryptionScheme<'a> {
    Pbes1(Parameters),
    Pbes2(Parameters<'a>),
}

Supported PKCS#5 password-based encryption schemes.

Variants (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.
Pbes1(Parameters)

Password-Based Encryption Scheme 1 as defined in RFC 8018 Section 6.1.

Pbes2(Parameters<'a>)

Password-Based Encryption Scheme 2 as defined in RFC 8018 Section 6.2.

Implementations

impl<'a> EncryptionScheme<'a>[src]

pub fn oid(&self) -> ObjectIdentifier[src]

Get the ObjectIdentifier (a.k.a OID) for this algorithm.

pub fn pbes1(&self) -> Option<&Parameters>[src]

Get pbes1::Parameters if it is the selected algorithm.

pub fn pbes2(&self) -> Option<&Parameters<'a>>[src]

Get pbes2::Parameters if it is the selected algorithm.

Trait Implementations

impl<'a> Clone for EncryptionScheme<'a>[src]

impl<'a> Debug for EncryptionScheme<'a>[src]

impl<'a> Encodable for EncryptionScheme<'a>[src]

impl<'a> Eq for EncryptionScheme<'a>[src]

impl<'a> From<Parameters<'a>> for EncryptionScheme<'a>[src]

impl<'a> From<Parameters> for EncryptionScheme<'a>[src]

impl<'a> PartialEq<EncryptionScheme<'a>> for EncryptionScheme<'a>[src]

impl<'a> StructuralEq for EncryptionScheme<'a>[src]

impl<'a> StructuralPartialEq for EncryptionScheme<'a>[src]

impl<'a> TryFrom<&'a [u8]> for EncryptionScheme<'a>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<AlgorithmIdentifier<'a>> for EncryptionScheme<'a>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<Any<'a>> for EncryptionScheme<'a>[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a> Send for EncryptionScheme<'a>[src]

impl<'a> Sync for EncryptionScheme<'a>[src]

impl<'a> Unpin for EncryptionScheme<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Decodable<'a> for T where
    T: TryFrom<Any<'a>, Error = Error>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.