DigitalSignature

DigitalSignature class

Signature in file.

class DigitalSignature;

Constructors

NameDescription
constructor(number[], string, string, Date)Constructor of DigitalSignature.
constructor(string, string, string, Date)Constructor of DigitalSignature.

Methods

MethodDescription
getComments()The purpose to signature.
setComments(string)The purpose to signature.
getSignTime()The time when the document was signed.
setSignTime(Date)The time when the document was signed.
getText()Specifies the text of actual signature in the digital signature. Default value is Empty.
setText(string)Specifies the text of actual signature in the digital signature. Default value is Empty.
getImage()Specifies an image for the digital signature. Default value is null.
setImage(number[])Specifies an image for the digital signature. Default value is null.
isValid()If this digital signature is valid and the document has not been tampered with, this value will be true.
getXAdESType()XAdES type. Default value is None(XAdES is off).
setXAdESType(XAdESType)XAdES type. Default value is None(XAdES is off).
isNull()Checks whether the implementation object is null.

constructor(number[], string, string, Date)

Constructor of DigitalSignature.

constructor(rawData: number[], password: string, comments: string, signTime: Date);

Parameters:

ParameterTypeDescription
rawDatanumber[]A byte array containing data from an X.509 certificate.
passwordstringThe password required to access the X.509 certificate data.
commentsstringThe purpose to signature.
signTimeDateThe utc time when the document was signed.

constructor(string, string, string, Date)

Constructor of DigitalSignature.

constructor(fileName: string, password: string, comments: string, signTime: Date);

Parameters:

ParameterTypeDescription
fileNamestringThe name of a certificate file.
passwordstringThe password required to access the X.509 certificate data.
commentsstringThe purpose to signature.
signTimeDateThe utc time when the document was signed.

getComments()

The purpose to signature.

getComments() : string;

setComments(string)

The purpose to signature.

setComments(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getSignTime()

The time when the document was signed.

getSignTime() : Date;

setSignTime(Date)

The time when the document was signed.

setSignTime(value: Date) : void;

Parameters:

ParameterTypeDescription
valueDateThe value to set.

getText()

Specifies the text of actual signature in the digital signature. Default value is Empty.

getText() : string;

setText(string)

Specifies the text of actual signature in the digital signature. Default value is Empty.

setText(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getImage()

Specifies an image for the digital signature. Default value is null.

getImage() : number[];

Returns

number[]

setImage(number[])

Specifies an image for the digital signature. Default value is null.

setImage(value: number[]) : void;

Parameters:

ParameterTypeDescription
valuenumber[]The value to set.

isValid()

If this digital signature is valid and the document has not been tampered with, this value will be true.

isValid() : boolean;

getXAdESType()

XAdES type. Default value is None(XAdES is off).

getXAdESType() : XAdESType;

Returns

XAdESType

setXAdESType(XAdESType)

XAdES type. Default value is None(XAdES is off).

setXAdESType(value: XAdESType) : void;

Parameters:

ParameterTypeDescription
valueXAdESTypeThe value to set.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;