Class DigitalSignatureInfo
-
- All Implemented Interfaces:
public class DigitalSignatureInfo
A digital signature stored inside a PDF document. This can be retrieved by calling getSignatureInfo. As a convenience to check the signing status of a document, you can retrieve the DocumentSignatureInfo by calling getDocumentSignatureInfoAsync.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
DigitalSignatureInfo.ReferenceTransformMethod
List of possible transformation methods of a Reference. A transformation method defines the scope of the document digest computation and revision comparison.
public class
DigitalSignatureInfo.BuildData
Build data dictionary of a software that created the digital signature.
public class
DigitalSignatureInfo.Reference
Signature reference dictionary. This dictionary contains the object digest result, including information about how it was computed.
-
Field Summary
Fields Modifier and Type Field Description public final static String
BUILD_DATA_FILTER_KEY
public final static String
BUILD_DATA_PUB_SEC_KEY
public final static String
BUILD_DATA_APP_KEY
public final static String
BUILD_DATA_SIGQ_KEY
public final String
name
public final Array<byte>
contents
public final List<Long>
byteRange
public final Calendar
creationDate
public final String
reason
public final String
location
public final String
filter
public final String
subFilter
public final List<DigitalSignatureInfo.Reference>
references
public final Map<String, DigitalSignatureInfo.BuildData>
buildProperties
-
Constructor Summary
Constructors Constructor Description DigitalSignatureInfo(InternalPdfDocument document, int documentSourceIndex, NativeFormField signedFormField)
Intended for internal usage only. DigitalSignatureInfo(DigitalSignatureInfo digitalSignatureInfo)
Intended for internal usage only.
-
Method Summary
Modifier and Type Method Description String
getName()
Returns name of the signer of this signature. Array<byte>
getContents()
Returns actual byte content of this signature in PDF file. List<Long>
getByteRange()
Returns range of bytes this signature covers. Calendar
getCreationDate()
Returns date of creation of this signature in UTC timezone. String
getReason()
Returns reason for signing if the signer attached it. String
getLocation()
Returns location for signing if the signer attached it. String
getFilter()
Returns name of the filter used for signing. String
getSubFilter()
Returns name of the subfilter used for signing. List<DigitalSignatureInfo.Reference>
getReferences()
Map<String, DigitalSignatureInfo.BuildData>
getBuildProperties()
Returns map of build properties. boolean
isSigned()
Returns if form field is actually signed. DigitalSignatureValidationResult
validate()
Checks the actual validity of the signature and returns . PdfDocument
getDocument()
Returns the document with which the signature info is associated. String
toString()
-
-
Constructor Detail
-
DigitalSignatureInfo
DigitalSignatureInfo(InternalPdfDocument document, int documentSourceIndex, NativeFormField signedFormField)
Intended for internal usage only.
-
DigitalSignatureInfo
DigitalSignatureInfo(DigitalSignatureInfo digitalSignatureInfo)
Intended for internal usage only.
-
-
Method Detail
-
getName
@Nullable() String getName()
Returns name of the signer of this signature. May be
null
no name is stored in the signature.- Returns:
Name of the signer, or
null
.
-
getContents
@Nullable() Array<byte> getContents()
Returns actual byte content of this signature in PDF file.
- Returns:
content of the signature or
null
if there's actually no signature attached to signature field.
-
getByteRange
@Nullable() List<Long> getByteRange()
Returns range of bytes this signature covers. Signatures cover two parts of a document: The part before the signature and the part after the signature. This method will return four elements because of that: [offset_of_part_before_signature, length_of_part_before_signature, offset_of_part_after_signature, length_of_part_after_signature].
To fully verify the integrity of the document, the both parts and contents of this signature should span full size of the document.
- Returns:
a list representing the byte range.
-
getCreationDate
@Nullable() Calendar getCreationDate()
Returns date of creation of this signature in UTC timezone. May be
null
if no creation date is stored in the signature.- Returns:
Creation date in UTC timezone, or
null
.
-
getReason
@Nullable() String getReason()
Returns reason for signing if the signer attached it.
- Returns:
reason for signing, can be
null
.
-
getLocation
@Nullable() String getLocation()
Returns location for signing if the signer attached it.
- Returns:
location for signing, can be
null
.
-
getFilter
@Nullable() String getFilter()
Returns name of the filter used for signing.
- Returns:
signing filter, can be
null
.
-
getSubFilter
@Nullable() String getSubFilter()
Returns name of the subfilter used for signing.
- Returns:
signing subfilter, can be
null
.
-
getReferences
@NonNull() List<DigitalSignatureInfo.Reference> getReferences()
-
getBuildProperties
@NonNull() Map<String, DigitalSignatureInfo.BuildData> getBuildProperties()
Returns map of build properties. Keys will be one of BUILD_DATA_APP_KEY, BUILD_DATA_FILTER_KEY, BUILD_DATA_PUB_SEC_KEY, BUILD_DATA_SIGQ_KEY.
- Returns:
map of build properties of this signature.
-
isSigned
boolean isSigned()
Returns if form field is actually signed. Note that this DOES NOT check if the signature is actually valid. Signature validity must be checked with validate call.
- Returns:
true
if this digital signature actually has contents.
-
validate
@NonNull()@WorkerThread() DigitalSignatureValidationResult validate()
Checks the actual validity of the signature and returns . This check will use certificates from for validating certificate of this signature and will also check for integrity issues. Note that validation may take a bit of time and shouldn't be run on the main thread.
- Returns:
DigitalSignatureValidationResult describing the validity of this signature.
-
getDocument
@NonNull() PdfDocument getDocument()
Returns the document with which the signature info is associated.
- Returns:
PdfDocument for this signature info.
-
-
-
-