iText 9.0.0 API
|
Utility class that provides several convenience methods concerning digital signatures. More...
Public Member Functions |
|
SignatureUtil (PdfDocument document) | |
Creates a SignatureUtil instance. More... |
|
virtual PdfPKCS7 | ReadSignatureData (String signatureFieldName) |
Prepares an PdfPKCS7 instance for the given signature. More... |
|
virtual PdfSignature | GetSignature (String name) |
Get PdfSignature dictionary based on the provided name. More... |
|
virtual PdfDictionary | GetSignatureDictionary (String name) |
Gets the signature dictionary, the one keyed by /V. More... |
|
virtual PdfDictionary | GetSignatureFormFieldDictionary (String name) |
virtual IList< String > | GetSignatureNames () |
Gets the field names that have signatures and are signed. More... |
|
virtual IList< String > | GetBlankSignatureNames () |
Gets the field names that have blank signatures. More... |
|
virtual int | GetTotalRevisions () |
Get the amount of signed document revisions. More... |
|
virtual int | GetRevision (String field) |
Get signed document revision number, which corresponds to the provided signature name. More... |
|
virtual String | GetTranslatedFieldName (String name) |
Get field name, translated using XFA, if any present in the document. More... |
|
virtual Stream | ExtractRevision (String field) |
Extracts a revision from the document. More... |
|
virtual bool | SignatureCoversWholeDocument (String name) |
Checks if the signature covers the entire document (except for signature's Contents) or just a part of it. More... |
|
virtual bool | DoesSignatureFieldExist (String name) |
Checks whether a name exists as a signature field or not. More... |
|
Utility class that provides several convenience methods concerning digital signatures.
|
inline |
Creates a SignatureUtil instance.
Creates a SignatureUtil instance. Sets the acroForm field to the acroForm in the PdfDocument. iText will create a new AcroForm if the PdfDocument doesn't contain one.
document | PdfDocument to be inspected |
|
inlinevirtual |
Checks whether a name exists as a signature field or not.
Checks whether a name exists as a signature field or not. It checks both signed fields and blank signatures.
name | name of the field |
|
inlinevirtual |
Extracts a revision from the document.
field | the signature field name |
|
inlinevirtual |
Gets the field names that have blank signatures.
|
inlinevirtual |
Get signed document revision number, which corresponds to the provided signature name.
field | signature name |
int
revision number
|
inlinevirtual |
Get PdfSignature dictionary based on the provided name.
name | signature name |
PdfSignature instance corresponding to the provided name. null
otherwise
|
inlinevirtual |
Gets the signature dictionary, the one keyed by /V.
name | the field name |
null
if the field is not a signature
|
inlinevirtual |
Gets the field names that have signatures and are signed.
|
inlinevirtual |
Get the amount of signed document revisions.
int
amount of signed document revisions
|
inlinevirtual |
Get field name, translated using XFA, if any present in the document.
name | field name to be translated |
|
inlinevirtual |
Prepares an PdfPKCS7 instance for the given signature.
Prepares an PdfPKCS7 instance for the given signature. This method handles signature parsing and might throw an exception if signature is malformed.
The returned PdfPKCS7 can be used to fetch additional info about the signature and also to perform integrity check of data signed by the given signature field.
Prepared PdfPKCS7 instance calculates digest based on signature's /ByteRange entry. In order to check that /ByteRange is properly defined and given signature indeed covers the current PDF document revision please use SignatureCoversWholeDocument(System.String) method.
signatureFieldName | the signature field name |
|
inlinevirtual |
Checks if the signature covers the entire document (except for signature's Contents) or just a part of it.
Checks if the signature covers the entire document (except for signature's Contents) or just a part of it.
If this method does not return true
it means that signature in question does not cover the entire contents of current iText.Kernel.Pdf.PdfDocument . Such signatures cannot be considered as verifying the PDF document, because content that is not covered by signature might have been modified since the signature creation.
name | the signature field name |