DigitalSignature

DigitalSignature class

Signature in file.

class DigitalSignature;

Constructors

ConstructorDescription
constructor(Uint8Array, string, string, Date)Constructor of DigitalSignature.
constructor(string, string, string, Date)Constructor of DigitalSignature.

Properties

PropertyTypeDescription
commentsstringThe purpose to signature.
signTimeDateThe time when the document was signed.
textstringSpecifies the text of actual signature in the digital signature. Default value is Empty.
imageUint8ArraySpecifies an image for the digital signature. Default value is null.
isValidbooleanReadonly. If this digital signature is valid and the document has not been tampered with, this value will be true.
xAdESTypeXAdESTypeXAdES type. Default value is None(XAdES is off).

Methods

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

constructor(Uint8Array, string, string, Date)

Constructor of DigitalSignature.

constructor(rawData: Uint8Array, 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.

comments

The purpose to signature.

comments : string;

signTime

The time when the document was signed.

signTime : Date;

text

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

text : string;

image

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

image : Uint8Array;

isValid

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

isValid : boolean;

xAdESType

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

xAdESType : XAdESType;

getComments()

@deprecated. Please use the ‘comments’ property instead. The purpose to signature.

getComments() : string;

setComments(string)

@deprecated. Please use the ‘comments’ property instead. The purpose to signature.

setComments(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getSignTime()

@deprecated. Please use the ‘signTime’ property instead. The time when the document was signed.

getSignTime() : Date;

setSignTime(Date)

@deprecated. Please use the ‘signTime’ property instead. The time when the document was signed.

setSignTime(value: Date) : void;

Parameters:

ParameterTypeDescription
valueDateThe value to set.

getText()

@deprecated. Please use the ’text’ property instead. Specifies the text of actual signature in the digital signature. Default value is Empty.

getText() : string;

setText(string)

@deprecated. Please use the ’text’ property instead. 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()

@deprecated. Please use the ‘image’ property instead. Specifies an image for the digital signature. Default value is null.

getImage() : Uint8Array;

setImage(Uint8Array)

@deprecated. Please use the ‘image’ property instead. Specifies an image for the digital signature. Default value is null.

setImage(value: Uint8Array) : void;

Parameters:

ParameterTypeDescription
valuenumber[]The value to set.

isValid()

@deprecated. Please use the ‘isValid’ property instead. If this digital signature is valid and the document has not been tampered with, this value will be true.

isValid() : boolean;

getXAdESType()

@deprecated. Please use the ‘xAdESType’ property instead. XAdES type. Default value is None(XAdES is off).

getXAdESType() : XAdESType;

Returns

XAdESType

setXAdESType(XAdESType)

@deprecated. Please use the ‘xAdESType’ property instead. 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;