DigitalSignature
Inheritance: java.lang.Object
public class DigitalSignature
Signature in file.
Constructors
Constructor | Description |
---|---|
DigitalSignature(byte[] rawData, String password, String comments, DateTime signTime) | Constructor of digitalSignature. |
Methods
Method | Description |
---|---|
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(byte[] rawData, String password, String comments, DateTime signTime)
public DigitalSignature(byte[] rawData, String password, String comments, DateTime signTime)
Constructor of digitalSignature. Uses Bouncy Castle implementation.
Parameters:
Parameter | Type | Description |
---|---|---|
rawData | byte[] | A byte array containing data from an X.509 certificate. |
password | java.lang.String | The password required to access the X.509 certificate data. |
comments | java.lang.String | The purpose to signature. |
signTime | DateTime | The utc time when the document was signed. |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
value | java.security.KeyStore |
setComments(String value)
public void setComments(String value)
The purpose to signature.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | java.util.UUID |
setImage(byte[] value)
public void setImage(byte[] value)
Specifies an image for the digital signature. Default value is null.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte[] |
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:
Parameter | Type | Description |
---|---|---|
value | java.util.UUID |
setSignTime(DateTime value)
public void setSignTime(DateTime value)
The time when the document was signed.
Parameters:
Parameter | Type | Description |
---|---|---|
value | DateTime |
setText(String value)
public void setText(String value)
Specifies the text of actual signature in the digital signature. Default value is Empty.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setXAdESType(int value)
public void setXAdESType(int value)
XAdES type. Default value is None(XAdES is off).
See XAdESType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |