[]
Implements the ISignatureBuilder interface, can be used to build a PKCS#7 signature.
public class Pkcs7SignatureBuilder : ISignatureBuilder
Initializes a new instance of the Pkcs7SignatureBuilder class.
public Pkcs7SignatureBuilder()
Initializes a new instance of the Pkcs7SignatureBuilder class.
public Pkcs7SignatureBuilder(X509Certificate2 signingCertificate, Pkcs7SignatureBuilder.SignatureFormat format = SignatureFormat.adbe_pkcs7_detached, OID hashAlgorithm = null)
signingCertificate
System.Security.Cryptography.X509Certificates.X509Certificate2The certificate to use.
format
Pkcs7SignatureBuilder.SignatureFormatThe signature format.
hashAlgorithm
OIDThe hash algorithm to use.
Initializes a new instance of the Pkcs7SignatureBuilder class.
public Pkcs7SignatureBuilder(X509Certificate2[] certificateChain, Pkcs7SignatureBuilder.SignatureFormat format = SignatureFormat.adbe_pkcs7_detached, OID hashAlgorithm = null)
certificateChain
System.Security.Cryptography.X509Certificates.X509Certificate2[]The certificate chain to use.
format
Pkcs7SignatureBuilder.SignatureFormatThe signature format.
hashAlgorithm
OIDThe hash algorithm to use.
Gets or sets the certificate chain. The first certificate is used to sign the document.
public X509Certificate2[] CertificateChain { get; set; }
Gets or sets the collection of certificate revocation lists (CRLs) to use. Items in this collection may be of the following types:
public IList<object> Crls { get; set; }
Gets or sets the signature format.
public Pkcs7SignatureBuilder.SignatureFormat Format { get; set; }
Gets or sets the HASH algorithm used if SignatureGenerator is not specified. Note! If Format is adbe_pkcs7_sha1 then this property is ignored and always SHA-1 used.
public OID HashAlgorithm { get; set; }
Gets or sets a value indicating whether to include OCSP information into the signature.
public bool IncludeOcsp { get; set; }
Gets or sets the IPkcs7SignatureGenerator object used to sign the authenticated attribute set that is a part of PKCS#7 signature. If not set, the default built-in generator will be used.
public IPkcs7SignatureGenerator SignatureGenerator { get; set; }