DigitalSignatureDetails
Contents
[
Hide
]DigitalSignatureDetails class
Contains details for signing a document with a digital signature.
public class DigitalSignatureDetails
Constructors
Name | Description |
---|---|
DigitalSignatureDetails(CertificateHolder, SignOptions) | Initializes a new instance of DigitalSignatureDetails class. |
Properties
Name | Description |
---|---|
CertificateHolder { get; set; } | Gets or sets a CertificateHolder object that contains the certificate used to sign a document. |
SignOptions { get; set; } | Gets or sets a SignOptions object used to sign a document. |
Examples
Shows how to sign OOXML document.
Document doc = new Document(MyDir + "Document.docx");
CertificateHolder certificateHolder = CertificateHolder.Create(MyDir + "morzal.pfx", "aw");
DigitalSignatureDetails digitalSignatureDetails = new DigitalSignatureDetails(
certificateHolder,
new SignOptions() { Comments = "Some comments", SignTime = DateTime.Now });
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
saveOptions.DigitalSignatureDetails = digitalSignatureDetails;
Assert.AreEqual(certificateHolder, digitalSignatureDetails.CertificateHolder);
Assert.AreEqual("Some comments", digitalSignatureDetails.SignOptions.Comments);
doc.Save(ArtifactsDir + "OoxmlSaveOptions.DigitalSignature.docx", saveOptions);
See Also
- namespace Aspose.Words.Saving
- assembly Aspose.Words