DigitalSignatureCollectionIsValid Property

Returns true if all digital signatures in this collection are valid and the document has not been tampered with Also returns true if there are no digital signatures. Returns false if at least one digital signature is invalid.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool IsValid { get; }

Property Value

Type: Boolean
Examples
Shows how to validate all signatures in a document.
// Load the signed document
Document doc = new Document(MyDir + "Digitally signed.docx");
DigitalSignatureCollection digitalSignatureCollection = doc.DigitalSignatures;

if (digitalSignatureCollection.IsValid)
{
    Console.WriteLine("Signatures belonging to this document are valid");
    Console.WriteLine(digitalSignatureCollection.Count);
    Console.WriteLine(digitalSignatureCollection[0].SignatureType);
}
else
{
    Console.WriteLine("Signatures belonging to this document are NOT valid");
}
See Also