Skip to main content
All docs
V22.1
.NET Framework 4.5.2+

SignatureInfo Class

Contains signer information (claimed roles, commitment type, etc.)

Namespace: DevExpress.Office.DigitalSignatures

Assembly: DevExpress.Docs.v22.1.dll

Declaration

public class SignatureInfo

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;
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the SignatureInfo class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Object
SignatureInfo
See Also