![JAR search and dependency download from the Maven repository](/logo.png)
com.esec.signature.ExternalSignature Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esec-itext Show documentation
Show all versions of esec-itext Show documentation
This library is used to sign PDFs.
The newest version!
package com.esec.signature;
import java.io.InputStream;
import java.security.GeneralSecurityException;
/**
* Interface that needs to be implemented to do the actual signing.
* For instance: you'll have to implement this interface if you want
* to sign a PDF using a smart card.
*/
public interface ExternalSignature {
/**
* Returns the hash algorithm.
* @return the hash algorithm (e.g. "SHA-1", "SHA-256,...")
*/
public String getHashAlgorithm();
/**
* Returns the encryption algorithm used for signing.
* @return the encryption algorithm ("RSA" or "DSA")
*/
public String getEncryptionAlgorithm();
/**
* Signs it using the encryption algorithm in combination with
* the digest algorithm.
* @param message the message you want to be hashed and signed
* @return a signed message digest
* @throws GeneralSecurityException
*/
public byte[] sign(InputStream message) throws GeneralSecurityException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy