DigitalSignature

Inheritance: java.lang.Object

public class DigitalSignature

Signature in file.

Constructors

ConstructorDescription
DigitalSignature(KeyStore certificate, String privateKeyPassword, String comments, DateTime signTime)Constructor of digitalSignature.

Methods

MethodDescription
equals(Object arg0)
getCertificate()Certificate object that was used to sign the document.
getClass()
getComments()The purpose to signature.
getId()Specifies a GUID which can be cross-referenced with the GUID of the signature line stored in the document content.
getImage()Specifies an image for the digital signature.
getProviderId()Specifies the class ID of the signature provider.
getSignTime()The time when the document was signed.
getText()Specifies the text of actual signature in the digital signature.
getXAdESType()XAdES type.
hashCode()
isValid()If this digital signature is valid and the document has not been tampered with, this value will be true.
notify()
notifyAll()
setCertificate(KeyStore value)Certificate object that was used to sign the document.
setComments(String value)The purpose to signature.
setId(UUID value)Specifies a GUID which can be cross-referenced with the GUID of the signature line stored in the document content.
setImage(byte[] value)Specifies an image for the digital signature.
setProviderId(UUID value)Specifies the class ID of the signature provider.
setSignTime(DateTime value)The time when the document was signed.
setText(String value)Specifies the text of actual signature in the digital signature.
setXAdESType(int value)XAdES type.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

DigitalSignature(KeyStore certificate, String privateKeyPassword, String comments, DateTime signTime)

public DigitalSignature(KeyStore certificate, String privateKeyPassword, String comments, DateTime signTime)

Constructor of digitalSignature.

Parameters:

ParameterTypeDescription
certificatejava.security.KeyStoreCertificate object that was used to sign the document.
privateKeyPasswordjava.lang.StringThe password for private key.
commentsjava.lang.StringThe purpose to signature.
signTimeDateTimeThe utc time when the document was signed.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getCertificate()

public KeyStore getCertificate()

Certificate object that was used to sign the document.

Returns: java.security.KeyStore

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getComments()

public String getComments()

The purpose to signature.

Returns: java.lang.String

getId()

public UUID getId()

Specifies a GUID which can be cross-referenced with the GUID of the signature line stored in the document content. Default value is Empty (all zeroes) Guid.

Remarks

When set, it associates SignatureLine with corresponding DigitalSignature.

Returns: java.util.UUID

getImage()

public byte[] getImage()

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

Returns: byte[]

getProviderId()

public UUID getProviderId()

Specifies the class ID of the signature provider. Default value is Empty (all zeroes) Guid.

Remarks

The cryptographic service provider (CSP) is an independent software module that actually performs cryptography algorithms for authentication, encoding, and encryption. Microsoft Office reserves the value of {00000000-0000-0000-0000-000000000000} for its default signature provider, and {000CD6A4-0000-0000-C000-000000000046} for its East Asian signature provider. The GUID of the additionally installed provider should be obtained from the documentation shipped with the provider.

Returns: java.util.UUID

getSignTime()

public DateTime getSignTime()

The time when the document was signed.

Returns: DateTime

getText()

public String getText()

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

Returns: java.lang.String

getXAdESType()

public int getXAdESType()

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

See XAdESType.

Returns: int

hashCode()

public native int hashCode()

Returns: int

isValid()

public boolean isValid()

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

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setCertificate(KeyStore value)

public void setCertificate(KeyStore value)

Certificate object that was used to sign the document.

Parameters:

ParameterTypeDescription
valuejava.security.KeyStore

setComments(String value)

public void setComments(String value)

The purpose to signature.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setId(UUID value)

public void setId(UUID value)

Specifies a GUID which can be cross-referenced with the GUID of the signature line stored in the document content. Default value is Empty (all zeroes) Guid.

Remarks

When set, it associates SignatureLine with corresponding DigitalSignature.

Parameters:

ParameterTypeDescription
valuejava.util.UUID

setImage(byte[] value)

public void setImage(byte[] value)

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

Parameters:

ParameterTypeDescription
valuebyte[]

setProviderId(UUID value)

public void setProviderId(UUID value)

Specifies the class ID of the signature provider. Default value is Empty (all zeroes) Guid.

Remarks

The cryptographic service provider (CSP) is an independent software module that actually performs cryptography algorithms for authentication, encoding, and encryption. Microsoft Office reserves the value of {00000000-0000-0000-0000-000000000000} for its default signature provider, and {000CD6A4-0000-0000-C000-000000000046} for its East Asian signature provider. The GUID of the additionally installed provider should be obtained from the documentation shipped with the provider.

Parameters:

ParameterTypeDescription
valuejava.util.UUID

setSignTime(DateTime value)

public void setSignTime(DateTime value)

The time when the document was signed.

Parameters:

ParameterTypeDescription
valueDateTime

setText(String value)

public void setText(String value)

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

Parameters:

ParameterTypeDescription
valuejava.lang.String

setXAdESType(int value)

public void setXAdESType(int value)

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

See XAdESType.

Parameters:

ParameterTypeDescription
valueint

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int