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

System.Security.Cryptography.Pkcs.CmsSigner

public sealed class CmsSigner
Represents a potential signer for a CMS/PKCS#7 signed message.
public X509Certificate2 Certificate { get; set; }

The Certificate property sets or retrieves the X509Certificate2 object that represents the signing certificate.

Gets a collection of certificates which are considered with WholeChain and ExcludeRoot.

public Oid DigestAlgorithm { get; set; }

Gets or sets the algorithm identifier for the hash algorithm to use with the signature.

public X509IncludeOption IncludeOption { get; set; }

Gets or sets the option indicating how much of a the signer certificate's certificate chain should be embedded in the signed message.

public AsymmetricAlgorithm PrivateKey { get; set; }

Gets or sets the private key object to use during signing.

Gets or sets the RSA signature padding to use.

Gets a collections of attributes to associate with this signature that are also protected by the signature.

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

Gets a collections of attributes to associate with this signature that are not protected by the signature.

public CmsSigner()

Initializes a new instance of the CmsSigner class with default values.

public CmsSigner(SubjectIdentifierType signerIdentifierType)

Initializes a new instance of the CmsSigner class with a specified subject identifier type.

public CmsSigner(X509Certificate2 certificate)

Initializes a new instance of the CmsSigner class with a specified signer certificate.

public CmsSigner(CspParameters parameters)

Initializes a new instance of the CmsSigner class from a persisted key.

public CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2 certificate)

Initializes a new instance of the CmsSigner class with a specified signer certificate and subject identifier type.

public CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2 certificate, AsymmetricAlgorithm privateKey)

Initializes a new instance of the CmsSigner class with a specified signer certificate, subject identifier type, and private key object.

public CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2 certificate, MLDsa privateKey)

public CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2 certificate, SlhDsa privateKey)

public CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2 certificate, CompositeMLDsa privateKey)

public CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2 certificate, RSA privateKey, RSASignaturePadding signaturePadding)

Initializes a new instance of the CmsSigner class with a specified signer certificate, subject identifier type, private key object, and RSA signature padding.