public class DigitalSignature extends BaseSignature
Contains Digital signature properties.
| Constructor and Description |
|---|
DigitalSignature()
Initialize Digital signature with default parameters.
|
DigitalSignature(KeyStore certificate)
Create Digital signature with specified certificate.
|
DigitalSignature(String signatureId)
Initialize Digital signature with known SignatureId.
|
DigitalSignature(X509Certificate cert,
PrivateKey key)
Create Digital signature based on X509Certificate certificate and PrivateKey.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
deepClone()
Clone Barcode Signature instance.
|
boolean |
equals(Object signature)
Overwrites Equals method to compare signature properties
|
KeyStore |
getCertificate()
Gets or sets the KeyStore certificate.
|
String |
getCertificateName()
Gets or sets the X509 certificate name.
|
String |
getComments()
Gets or sets the signing purpose comment.
|
PrivateKey |
getPrivateKey()
Gets or sets the PrivateKey of certificate.
|
Date |
getSignTime()
Gets or sets the time the document was signed.
|
String |
getThumbprint()
Gets the thumbprint of a certificate.
|
X509Certificate |
getX509Certificate()
Gets or sets the X509 certificate.
|
int |
getXAdESType()
XAdES type
XAdESType. |
int |
hashCode()
Overrides GetHashCode method
|
boolean |
isValid()
Keeps true if this digital signature is valid and the document has not been tampered with.
|
static List<DigitalSignature> |
loadDigitalSignatures()
Load Digital signature from all system X509 Certificates Stores.
|
static List<DigitalSignature> |
loadDigitalSignatures(com.groupdocs.signature.domain.signatures.StoreName storeName)
Load Digital signature from passed X509 Certificates Store.
|
void |
setCertificate(KeyStore value)
Gets or sets the KeyStore certificate.
|
void |
setCertificateName(String value)
Gets or sets the X509 certificate name.
|
void |
setComments(String value)
Gets or sets the signing purpose comment.
|
void |
setPrivateKey(PrivateKey value)
Gets or sets the PrivateKey of certificate.
|
void |
setSignTime(Date value)
Gets or sets the time the document was signed.
|
void |
setValid(boolean value)
Keeps true if this digital signature is valid and the document has not been tampered with.
|
void |
setX509Certificate(X509Certificate value)
Gets or sets the X509 certificate.
|
void |
setXAdESType(int value)
XAdES type
XAdESType. |
getCreatedOn, getDeleted, getHeight, getLeft, getModifiedOn, getPageNumber, getSignatureId, getSignatureType, getTop, getWidth, isSignature, setCreatedOn, setHeight, setLeft, setModifiedOn, setPageNumber, setSignature, setTop, setWidth, supportMetaInfoLayer, toStringpublic DigitalSignature()
Initialize Digital signature with default parameters.
public DigitalSignature(KeyStore certificate)
Create Digital signature with specified certificate.
certificate - X509 certificate.public DigitalSignature(String signatureId)
Initialize Digital signature with known SignatureId.
public DigitalSignature(X509Certificate cert, PrivateKey key) throws Exception
Create Digital signature based on X509Certificate certificate and PrivateKey.
cert - X509Certificate certificate.key - PrivateKey of certificate.Exceptionpublic Object deepClone()
Clone Barcode Signature instance.
deepClone in class BaseSignaturepublic boolean equals(Object signature)
Overwrites Equals method to compare signature properties
equals in class BaseSignaturesignature - Signature object to compare with.public final KeyStore getCertificate()
Gets or sets the KeyStore certificate.
public final String getCertificateName()
Gets or sets the X509 certificate name.
public final String getComments()
Gets or sets the signing purpose comment.
public final PrivateKey getPrivateKey()
Gets or sets the PrivateKey of certificate.
public final Date getSignTime()
Gets or sets the time the document was signed.
public final String getThumbprint()
Gets the thumbprint of a certificate.
public final X509Certificate getX509Certificate()
Gets or sets the X509 certificate.
public final int getXAdESType()
XAdES type XAdESType. Default value is None (XAdES is off).
At this moment XAdES signature type is supported only for Spreadsheet documents.
public int hashCode()
Overrides GetHashCode method
hashCode in class BaseSignaturepublic final boolean isValid()
Keeps true if this digital signature is valid and the document has not been tampered with.
public static List<DigitalSignature> loadDigitalSignatures() throws Exception
Load Digital signature from all system X509 Certificates Stores.
DigitalSignature Digital Signatures.Exceptionpublic static List<DigitalSignature> loadDigitalSignatures(com.groupdocs.signature.domain.signatures.StoreName storeName) throws Exception
Load Digital signature from passed X509 Certificates Store.
DigitalSignature Digital Signatures.Exceptionpublic final void setCertificate(KeyStore value)
Gets or sets the KeyStore certificate.
public final void setCertificateName(String value)
Gets or sets the X509 certificate name.
public final void setComments(String value)
Gets or sets the signing purpose comment.
public final void setPrivateKey(PrivateKey value)
Gets or sets the PrivateKey of certificate.
public final void setSignTime(Date value)
Gets or sets the time the document was signed.
public final void setValid(boolean value)
Keeps true if this digital signature is valid and the document has not been tampered with.
public final void setX509Certificate(X509Certificate value)
Gets or sets the X509 certificate.
public final void setXAdESType(int value)
XAdES type XAdESType. Default value is None (XAdES is off).
At this moment XAdES signature type is supported only for Spreadsheet documents.
Copyright © 2024. All rights reserved.