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

ProtectedPkiMessage

public class ProtectedPkiMessage
Wrapper for a PKIMessage with protection attached to it.
public virtual PkiBody Body { get; }

Message body

public virtual bool HasPasswordBasedMacProtected { get; }

Determine whether the message is protected by a password based MAC. Use verify(PKMACBuilder, char[]) to verify the message if this method returns true.

public virtual PkiHeader Header { get; }

Message header

Wrap a general message.

public ProtectedPkiMessage(PkiMessage pkiMessage)

Wrap a PKI message.

public virtual X509Certificate[] GetCertificates()

Return the extra certificates associated with this message.

public virtual PkiMessage ToAsn1Message()

Return the underlying ASN.1 structure contained in this object.

public virtual bool Verify(IVerifierFactory verifierFactory)

Verify a message with a public key based signature attached.

public virtual bool Verify(PKMacBuilder pkMacBuilder, char[] password)

Verify a message with password based MAC protection.