DigitalSignatures
IPresentation.DigitalSignatures property
返回用于签署演示文稿的签名集合。 只读IDigitalSignatureCollection
。
public IDigitalSignatureCollection DigitalSignatures { get; }
例子
[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.");
}
}
也可以看看
- interface IDigitalSignatureCollection
- interface IPresentation
- 命名空间 Aspose.Slides
- 部件 Aspose.Slides