com.aspose.words
Class DigitalSignatureCollection
java.lang.Object
com.aspose.words.DigitalSignatureCollection
- All Implemented Interfaces:
- java.lang.Iterable
public class DigitalSignatureCollection
- extends java.lang.Object
Provides a read-only collection of digital signatures attached to a document.
Document.DigitalSignaturesExample:
Shows how to validate all signatures in a document.
// Load the signed document.
Document doc = new Document(getMyDir() + "Document.Signed.docx");
if (doc.getDigitalSignatures().isValid())
System.out.println("Signatures belonging to this document are valid");
else
System.out.println("Signatures belonging to this document are NOT valid");
Property Getters/Setters Summary |
int | getCount() | |
|
Gets the number of elements contained in the collection.
|
boolean | isValid() | |
|
Returns true if all digital signatures in this collection are valid and the document has not been tampered with
Also returns true if there are no digital signatures.
Returns false if at least one digital signature is invalid.
|
DigitalSignature | get(int index) | |
|
Gets a document signature at the specified index.
|
Method Summary |
java.util.Iterator | iterator() | |
Returns a dictionary iterator object that can be used to iterate over all items in the collection.
|
DigitalSignatureCollection
public DigitalSignatureCollection()
-
Property Getters/Setters Detail |
getCount | |
public int getCount()
|
-
Gets the number of elements contained in the collection.
isValid | |
public boolean isValid()
|
-
Returns
true
if all digital signatures in this collection are valid and the document has not been tampered with
Also returns true
if there are no digital signatures.
Returns false
if at least one digital signature is invalid.
Example:
Shows how to validate all signatures in a document.
// Load the signed document.
Document doc = new Document(getMyDir() + "Document.Signed.docx");
if (doc.getDigitalSignatures().isValid())
System.out.println("Signatures belonging to this document are valid");
else
System.out.println("Signatures belonging to this document are NOT valid");
-
Gets a document signature at the specified index.
- Parameters:
index
- Zero-based index of the signature.
iterator | |
public java.util.Iterator iterator() |
-
Returns a dictionary iterator object that can be used to iterate over all items in the collection.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.