IDigitalSignature
public interface IDigitalSignature
Digital signature in signed file.
Methods
Method | Description |
---|---|
getCertificate() | Certificate object that was used to sign the document. |
isValid() | If this digital signature is valid and the document has not been tampered with, this value will be true. |
getSignTime() | The time when the document was signed. |
getComments() | The purpose of signature. |
setComments(String value) | The purpose of signature. |
getCertificate()
public abstract byte[] getCertificate()
Certificate object that was used to sign the document. Read-only byte[].
Returns: byte[]
isValid()
public abstract boolean isValid()
If this digital signature is valid and the document has not been tampered with, this value will be true. Read-only boolean.
Presentation pres = new Presentation("SomePresentationSigned.pptx"); try { for (IDigitalSignature signature : pres.getDigitalSignatures()) System.out.println("Signature check: " + (signature.isValid() ? "VALID" : "INVALID")); } finally { if (pres != null) pres.dispose(); }
Returns: boolean
getSignTime()
public abstract Date getSignTime()
The time when the document was signed. Read-only java.util.Date.
Presentation pres = new Presentation("SomePresentationSigned.pptx"); try { for (IDigitalSignature signature : pres.getDigitalSignatures()) System.out.println("Signature check: " + (signature.IsValid ? "VALID" : "INVALID") + ", Signing time: " + signature.getSignTime()); } finally { if (pres != null) pres.dispose(); }
Returns: java.util.Date
getComments()
public abstract String getComments()
The purpose of signature. Read/write String.
Returns: java.lang.String
setComments(String value)
public abstract void setComments(String value)
The purpose of signature. Read/write String.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |