public class PdfSigner extends Signer
| Modifier and Type | Class and Description |
|---|---|
static class |
PdfSigner.Mode |
| Constructor and Description |
|---|
PdfSigner(String alias,
KeyRing keyring,
Provider provider) |
PdfSigner(String alias,
KeyRing keyring,
Provider provider,
PdfSigner.Mode mode)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialise()
Initialises the object.
|
byte[] |
sign(byte[] data)
Signs the given set of data.
|
boolean |
verify(byte[] signed)
Verifies the signature of the given set of encapsulated data.
|
boolean |
verify(byte[] signed,
byte[] data)
Verifies the signature of the given set of detached data.
|
getAlias, getKeyRing, getProvider, isEncapsulateDatapublic PdfSigner(String alias, KeyRing keyring, Provider provider) throws CryptoException
CryptoExceptionpublic PdfSigner(String alias, KeyRing keyring, Provider provider, PdfSigner.Mode mode) throws CryptoException
CryptoExceptionpublic void initialise()
throws CryptoException
Signerinitialise in class SignerCryptoException - if anything went wrong accessing, opening or interpreting the keystore.public byte[] sign(byte[] data)
throws CryptoException
Signersign in class Signerdata - the data to be signed.CryptoExceptionpublic boolean verify(byte[] signed)
throws CryptoException
Signerverify in class Signersigned - the encapsulated data.CryptoExceptionpublic boolean verify(byte[] signed,
byte[] data)
throws CryptoException
Signerverify in class Signersigned - the detached data whose signature is to be verified.data - the original, plain text data.CryptoExceptionCopyright © 2012-2014 Andrea Funtò. See here for terms and conditions.