IPresentationDigitalSignatures Property

Returns the collection of signatures used to sign the presentation. Read-only IDigitalSignatureCollection.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 20.12.0.0 (20.12)
Syntax
IDigitalSignatureCollection DigitalSignatures { get; }

Property Value

Type: IDigitalSignatureCollection
Examples
[C#]
using (Presentation pres = new Presentation("SomePresentationSigned.pptx"))
{
    if (pres.DigitalSignatures.Count > 0)
    {
        bool allSignaturesAreValid = true;

        Console.WriteLine("Signatures used to sign the presentation: ");
        foreach (DigitalSignature signature in pres.DigitalSignatures)
        {
            Console.WriteLine(signature.Certificate.SubjectName.Name + ", "
                    + signature.SignTime.ToString("yyyy-MM-dd HH:mm") + " -- " + (signature.IsValid ? "VALID" : "INVALID"));
            allSignaturesAreValid &= signature.IsValid;
        }

        if (allSignaturesAreValid)
            Console.WriteLine("Presentation is genuine, all signatures are valid.");
        else
            Console.WriteLine("Presentation has been modified since signing.");
    }
}
See Also