Struct pkcs8::EncryptedPrivateKeyInfo[][src]

pub struct EncryptedPrivateKeyInfo<'a> {
    pub encryption_algorithm: AlgorithmIdentifier<'a>,
    pub encrypted_data: &'a [u8],
}
This is supported on crate feature pkcs5 only.

PKCS#8 EncryptedPrivateKeyInfo.

ASN.1 structure containing an AlgorithmIdentifier identifying a symmetric encryption scheme and encrypted private key data.

Encryption algorithm support

tl;dr: none yet!

This crate does not (yet) support decrypting/encrypting private key data. However, support for the following may be added in future releases:

  • PKCS#5 v1.5 supports several password-based encryption algorithms, including PBE-SHA1-3DES.
  • PKCS#5 v2 adds support for AES-CBC encryption with iterated PRFs such as hmacWithSHA256.

Please see the following GitHub issue for tracking information:

https://github.com/RustCrypto/utils/issues/263

Schema

Structure described in RFC 5208 Section 6:

EncryptedPrivateKeyInfo ::= SEQUENCE {
  encryptionAlgorithm  EncryptionAlgorithmIdentifier,
  encryptedData        EncryptedData }

EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier

EncryptedData ::= OCTET STRING

Fields

encryption_algorithm: AlgorithmIdentifier<'a>

AlgorithmIdentifier for the symmetric encryption algorithm used to encrypt the encrypted_data field.

encrypted_data: &'a [u8]

Private key data

Trait Implementations

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

impl<'a> Copy for EncryptedPrivateKeyInfo<'a>[src]

impl<'a> Message<'a> for EncryptedPrivateKeyInfo<'a>[src]

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

type Error = Error

The type returned in the event of a conversion error.

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

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

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<'a, M> Encodable for M where
    M: Message<'a>, 
[src]

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

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

impl<'a, M> Tagged for M where
    M: Message<'a>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.