Table of Contents

Class Pkcs8EncryptedPrivateKeyInfo

Namespace
Org.BouncyCastle.Pkcs
Assembly
BouncyCastle.Cryptography.dll

A holding class for a PKCS#8 encrypted private key info object that allows for its decryption.

public class Pkcs8EncryptedPrivateKeyInfo
Inheritance
Pkcs8EncryptedPrivateKeyInfo
Inherited Members

Constructors

Pkcs8EncryptedPrivateKeyInfo(EncryptedPrivateKeyInfo)

Base constructor from a PKCS#8 EncryptedPrivateKeyInfo object.

public Pkcs8EncryptedPrivateKeyInfo(EncryptedPrivateKeyInfo encryptedPrivateKeyInfo)

Parameters

encryptedPrivateKeyInfo EncryptedPrivateKeyInfo

A PKCS#8 EncryptedPrivateKeyInfo object.

Pkcs8EncryptedPrivateKeyInfo(byte[])

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

public Pkcs8EncryptedPrivateKeyInfo(byte[] encryptedPrivateKeyInfo)

Parameters

encryptedPrivateKeyInfo byte[]

A BER encoding of a PKCS#8 EncryptedPrivateKeyInfo objects.

Methods

DecryptPrivateKeyInfo(IDecryptorBuilderProvider)

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

public PrivateKeyInfo DecryptPrivateKeyInfo(IDecryptorBuilderProvider inputDecryptorProvider)

Parameters

inputDecryptorProvider IDecryptorBuilderProvider

A provider to query for decryptors for the object.

Returns

PrivateKeyInfo

The decrypted private key info structure.

GetEncoded()

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

public byte[] GetEncoded()

Returns

byte[]

A byte array containing the encoded object.

GetEncryptedData()

Returns a copy of the encrypted data in this structure.

public byte[] GetEncryptedData()

Returns

byte[]

Return a copy of the encrypted data in this object.

ToAsn1Structure()

Returns the underlying ASN.1 structure inside this object.

public EncryptedPrivateKeyInfo ToAsn1Structure()

Returns

EncryptedPrivateKeyInfo

Return the EncryptedPrivateKeyInfo structure in this object.