This interface defines a standard way to have the document signed. Different classes will implement the interface using different library behind.
Set the envelope to host the Signature element. That is the XML document where the Signature element to be added. The digital signature here will always be an enveloped signature. The envelope will be included in the process of signing.
- doc – the XML document to host the Signature element
sign(CompositeKeyStore ks, String alias, char password)¶
Signs the envelope and documents by using the specified key in the keystore.
- ks – the keystore holding the key for signing
- alias – the alias of the key for signing
- password – the password for accessing the key for signing
- SignException – when there is any error in the processing of signing
Verifies the signature in the envelope passed in, which may reference the documents specified using the addDocument method.
- VerifyException – when there is any error in the processing of verification
true if the signature can be verified successfully, false if otherwise.