<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />

Pkcs8EncryptedPrivateKeyInfo

A holding class for a PKCS#8 encrypted private key info object that allows for its decryption.
public Pkcs8EncryptedPrivateKeyInfo(EncryptedPrivateKeyInfo encryptedPrivateKeyInfo)

Base constructor from a PKCS#8 EncryptedPrivateKeyInfo object.

public Pkcs8EncryptedPrivateKeyInfo(byte[] encryptedPrivateKeyInfo)

Base constructor from a BER encoding of a PKCS#8 EncryptedPrivateKeyInfo object.

Get a decryptor from the passed in provider and decrypt the encrypted private key info, returning the result.

public byte[] GetEncoded()

Return a binary ASN.1 encoding of the EncryptedPrivateKeyInfo structure in this object.

public byte[] GetEncryptedData()

Returns a copy of the encrypted data in this structure.

Returns the underlying ASN.1 structure inside this object.