<PackageReference Include="System.Security.Cryptography.Pkcs" Version="11.0.0-preview.3.26207.106" />

System.Security.Cryptography.Pkcs.CmsRecipient

public sealed class CmsRecipient
The CmsRecipient class defines the recipient of a CMS/PKCS #7 message.
public X509Certificate2 Certificate { get; }

Gets the certificate to use when encrypting for this recipient.

Gets the scheme to use for identifying which recipient certificate was used.

public CmsRecipient(X509Certificate2 certificate)

Initializes a new instance of the CmsRecipient class with a specified certificate, using the default encryption mode for the public key algorithm and an IssuerAndSerialNumber subject identifier.

public CmsRecipient(SubjectIdentifierType recipientIdentifierType, X509Certificate2 certificate)

Initializes a new instance of the CmsRecipient class with a specified certificate and recipient identifier type, using the default encryption mode for the public key algorithm.