SignatureInfo Class
Contains signer information (claimed roles, commitment type, etc.)
Namespace: DevExpress.Office.DigitalSignatures
Assembly: DevExpress.Docs.v24.1.dll
NuGet Package: DevExpress.Document.Processor
Declaration
Related API Members
The following members return SignatureInfo objects:
Remarks
Pass the SignatureInfo object as the DocumentSigner.Sign method parameter to add signer information to the signature.
The code sample below defines signer information and signs the file:
using DevExpress.Office.DigitalSignatures;
using DevExpress.Office.Tsp;
using System;
using System.Diagnostics;
using System.Security.Cryptography.X509Certificates;
static void SignDocument(string path, string output)
{
DocumentSigner documentSigner = new DocumentSigner();
documentSigner.Sign(path, output, CreateSignatureOptions(),
CreateSignatureInfo());
Process.Start(output);
}
static SignatureInfo CreateSignatureInfo()
{
SignatureInfo signatureInfo = new SignatureInfo();
signatureInfo.CommitmentType = CommitmentType.ProofOfApproval;
signatureInfo.Time = DateTime.UtcNow;
signatureInfo.ClaimedRoles.Clear();
signatureInfo.ClaimedRoles.Add("Sales Representative");
signatureInfo.Country = "USA";
signatureInfo.City = "Seattle";
signatureInfo.StateOrProvince = "WA";
signatureInfo.Address1 = "507 - 20th Ave. E.";
signatureInfo.Address2 = "Apt. 2A";
signatureInfo.PostalCode = "98122";
signatureInfo.Comments = "Demo Digital Signature";
return signatureInfo;
}
static SignatureOptions CreateSignatureOptions()
{
X509Certificate2 certificate =
new X509Certificate2("Certificate/SignDemo.pfx", "dxdemo");
Uri tsaServer = new Uri("https://freetsa.org/tsr");
SignatureOptions options = new SignatureOptions();
options.Certificate = certificate;
options.DigestMethod = HashAlgorithmType.SHA256;
return options;
}
Inheritance
Object
SignatureInfo
See Also