[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.SignatureProperties

Class SignatureProperties

Namespace
GrapeCity.Documents.Pdf
Assembly
GcDocs.Pdf.dll

Represents properties used to sign a PDF document.

public class SignatureProperties
Inheritance
object
SignatureProperties
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

SignatureProperties()

Initializes a new instance of the SignatureProperties class.

public SignatureProperties()

Properties

Certificate

Gets or sets a certificate used to generate a digital signature.

NOTE: This property is obsolete and should not be used. Instead, use SignatureBuilder and Pkcs7SignatureBuilder class to create a PKCS#7 signature and setup its properties.

[Obsolete("Use SignatureProperties.SignatureBuilder and Pkcs7SignatureBuilder to define signature properties.")]
public X509Certificate2 Certificate { get; set; }

Property Value

System.Security.Cryptography.X509Certificates.X509Certificate2

ContactInfo

Gets or sets the information provided by the signer to enable a recipient to contact the signer to verify the signature (for example, a phone number).

public string ContactInfo { get; set; }

Property Value

string

DocumentAccessPermissions

Gets or sets a document's access permissions granted by this signature. This property can be specified only for one and first signature in the document, this signature will be "certification signature".

public AccessPermissions? DocumentAccessPermissions { get; set; }

Property Value

AccessPermissions?

Location

Gets or sets the CPU host name or physical location of the signing.

By default this property is initialized with System.Environment.MachineName.

public string Location { get; set; }

Property Value

string

Reason

Gets or sets the reason for the signing, such as "I agree...".

public string Reason { get; set; }

Property Value

string

SignatureAppearance

Gets or sets a SignatureAppearance object defining the visual appearance of the generated signature.

By default this property is initialized with a default instance of the SignatureAppearance class.

public SignatureAppearance SignatureAppearance { get; set; }

Property Value

SignatureAppearance

SignatureBuilder

Gets or sets a ISignatureBuilder object used to build the signature.

public ISignatureBuilder SignatureBuilder { get; set; }

Property Value

ISignatureBuilder

SignatureDigestAlgorithm

Gets or sets the signature digest algorithm.

NOTE: This property is obsolete and should not be used. Instead, use SignatureBuilder and Pkcs7SignatureBuilder class to create a PKCS#7 signature and setup its properties.

If SignatureFormat is PKCS7SHA1, then this property is ignored and SHA1 is used.

[Obsolete("Use SignatureProperties.SignatureBuilder and Pkcs7SignatureBuilder to define signature properties.")]
public SignatureDigestAlgorithm SignatureDigestAlgorithm { get; set; }

Property Value

SignatureDigestAlgorithm

SignatureField

Gets or sets an AcroForm field used to store a digital signature.

If Widget is not null, a visual appearance will be generated based on values of the properties SigningDateTime, Location etc.

public Field SignatureField { get; set; }

Property Value

Field

SignatureFormat

Gets or sets the format of the signature.

NOTE: This property is obsolete and should not be used. Instead, use SignatureBuilder and Pkcs7SignatureBuilder class to create a PKCS#7 signature and setup its properties.

[Obsolete("Use SignatureProperties.SignatureBuilder and Pkcs7SignatureBuilder to define signature properties.")]
public SignatureFormat SignatureFormat { get; set; }

Property Value

SignatureFormat

SignerName

Gets or sets the name of the person or authority signing the document.

NOTE: This value is used only if it is not possible to extract the name from the signature, for example from the certificate of the signer.

By default this property is initialized with System.Environment.UserName.

public string SignerName { get; set; }

Property Value

string

SigningDateTime

Gets or sets the time of signing.

NOTE: This value is used only if the time of signing is not available in the signature. For example, a time stamp can be embedded in a PKCS#7 binary data object.

By default this property is initialized with the current date and time.

public DateTime? SigningDateTime { get; set; }

Property Value

System.DateTime?

TimeStamp

Gets or sets the object implementing the ITimeStampGenerator interface that is used to generate the time-stamp token included in the digital signature of the document.

public ITimeStampGenerator TimeStamp { get; set; }

Property Value

ITimeStampGenerator

Methods

CreatePAdES_B_B(params X509Certificate2[])

Creates a SignatureProperties object and initializes it so that it will create a PAdES B-B signature.

public static SignatureProperties CreatePAdES_B_B(params X509Certificate2[] certificateChain)

Parameters

certificateChain System.Security.Cryptography.X509Certificates.X509Certificate2[]

The certificate chain. The first certificate is used for signing.

Returns

SignatureProperties

The SignatureProperties object.

CreatePAdES_B_T(TimeStamp, params X509Certificate2[])

Creates a SignatureProperties object and initializes it so that it will create a PAdES B-T signature.

public static SignatureProperties CreatePAdES_B_T(TimeStamp timeStamp, params X509Certificate2[] certificateChain)

Parameters

timeStamp TimeStamp

The TimeStamp object.

certificateChain System.Security.Cryptography.X509Certificates.X509Certificate2[]

The certificate chain. The first certificate is used for signing.

Returns

SignatureProperties

The SignatureProperties object.s