DigitalSignature Class

Represents a digital signature on a document and the result of its verification.
Inheritance Hierarchy

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
public class DigitalSignature

The DigitalSignature type exposes the following members.

Public propertyCode exampleCertificateHolder
Returns the certificate holder object that contains the certificate was used to sign the document.
Public propertyCode exampleComments
Gets the signing purpose comment.
Public propertyCode exampleIssuerName
Returns the subject distinguished name of the certificate isuuer.
Public propertyCode exampleIsValid
Returns true if this digital signature is valid and the document has not been tampered with.
Public propertyCode exampleSignatureType
Gets the type of the digital signature.
Public propertyCode exampleSignTime
Gets the time the document was signed.
Public propertyCode exampleSubjectName
Returns the subject distinguished name of the certificate that was used to sign the document.
Shows how to validate each signature in a document and display basic information about the signature.
// Load the document which contains signature
Document doc = new Document(MyDir + "Digitally signed.docx");

foreach (DigitalSignature signature in doc.DigitalSignatures)
    Console.WriteLine("*** Signature Found ***");
    Console.WriteLine("Is valid: " + signature.IsValid);
    Console.WriteLine("Reason for signing: " +
                      signature.Comments); // This property is available in MS Word documents only
    Console.WriteLine("Signature type: " + signature.SignatureType);
    Console.WriteLine("Time of signing: " + signature.SignTime);
    Console.WriteLine("Subject name: " + signature.CertificateHolder.Certificate.SubjectName);
    Console.WriteLine("Issuer name: " + signature.CertificateHolder.Certificate.IssuerName.Name);
See Also