public class CPDFSignature
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CPDFSignature.CertUsage |
static class |
CPDFSignature.SignatureStatus |
Modifier and Type | Field and Description |
---|---|
static java.lang.Object |
lockObj |
Constructor and Description |
---|
CPDFSignature(long ptr,
java.lang.String fieldName,
android.graphics.RectF bounds,
java.lang.String name,
java.lang.String date,
java.lang.String filter,
java.lang.String subFilter,
java.lang.String reason,
java.lang.String location) |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkPKCS12Password(java.lang.String p12Path,
java.lang.String password)
Check whether the password of the certificate file is correct.
|
static boolean |
generatePKCS12Cert(CPDFOwnerInfo ownerInfo,
java.lang.String password,
java.lang.String save_path,
CPDFSignature.CertUsage flag)
Create a pkcs12 certificate.
|
android.graphics.RectF |
getBounds()
Get the rectangular area where the signature form is located.
|
java.lang.String |
getDate()
Get the time signing the document.
|
java.lang.String |
getFieldName()
Get the field name of signature form widget.
|
java.lang.String |
getFilter()
Get filter of the signature.
|
java.lang.String |
getLocation()
Get the CPU host name or physical location of the signing.
|
java.lang.String |
getName()
The name of the person or authority signing the document.
|
int |
getPageIndex(CPDFDocument doc)
Get page index of the signature.
|
CPDFDocument.PDFDocMdpP |
getPermissionType()
Get the permission type of the signed document.
|
java.lang.String |
getReason()
Get singature reason.
|
long |
getSignaturePtr()
Get the signature pointer.
|
CPDFSigner[] |
getSignerArr()
Get all signers of the signature.
|
java.lang.String |
getSubFilter()
Get sub filter of the signature.
|
static CPDFX509 |
getX509ByPKCS12Cert(java.lang.String p12_path,
java.lang.String password)
Get certificate object.
|
boolean |
isDigitalSigned()
Whether it is a digital signature.
|
boolean |
isValid()
Whether the signature is valid.
|
void |
release()
Release the signature.
|
static boolean |
removeCertFromPath(java.lang.String path,
CPDFX509 cpdfx509)
Remove certificate from the certificate storage directory.
|
boolean |
verify(CPDFDocument document)
Verify whether the signature is valid.
|
boolean |
verifyDocument(CPDFDocument doc)
Verify the document modification permissions.
|
boolean |
veryfyTimestamp(android.content.Context context)
Verify the timestamps on the timestamps signature.
|
public CPDFSignature(long ptr, java.lang.String fieldName, android.graphics.RectF bounds, java.lang.String name, java.lang.String date, java.lang.String filter, java.lang.String subFilter, java.lang.String reason, java.lang.String location)
public boolean isValid()
public long getSignaturePtr()
public android.graphics.RectF getBounds()
public java.lang.String getName()
public java.lang.String getDate()
public java.lang.String getFilter()
public java.lang.String getSubFilter()
public java.lang.String getLocation()
public boolean verify(CPDFDocument document)
document
- The CPDFDocumentpublic boolean verifyDocument(CPDFDocument doc)
doc
- The CPDFDocument object of the file to be verified.public boolean veryfyTimestamp(android.content.Context context)
public CPDFSigner[] getSignerArr()
public boolean isDigitalSigned()
public int getPageIndex(CPDFDocument doc)
doc
- CPDFDocument object.public java.lang.String getFieldName()
public java.lang.String getReason()
public static boolean generatePKCS12Cert(CPDFOwnerInfo ownerInfo, java.lang.String password, java.lang.String save_path, CPDFSignature.CertUsage flag)
ownerInfo
- CPDFOwnerInfo object.password
- Certificate file password.save_path
- Certificate file save path.flag
- The certificate use type.public static CPDFX509 getX509ByPKCS12Cert(java.lang.String p12_path, java.lang.String password)
p12_path
- Certificate file path.password
- Certificate file password.public static boolean removeCertFromPath(java.lang.String path, CPDFX509 cpdfx509)
path
- Certificate storage directory.cpdfx509
- Certificate to remove.public static boolean checkPKCS12Password(java.lang.String p12Path, java.lang.String password)
p12Path
- The certificate file path.password
- The password of the certificate file.public CPDFDocument.PDFDocMdpP getPermissionType()
public void release()