| Modifier and Type | Method and Description |
|---|---|
List<String> |
KeyRing.enumerateAliases()
Returns a list of aliases for the given key store.
|
KeyPair |
KeyRing.getKeyPair(String alias,
String password)
Gets a private and public key pair for the
given alias.
|
Key |
KeyRing.getPrivateKey(String alias)
Returns the private key (or a proxy) for the given alias.
|
Key |
KeyRing.getPrivateKey(String alias,
String password)
Returns the private key for the given alias, using the provided password
to unlock it; the key pair (private/public) password can differ from that
of the key store it is kept in.
|
Key |
KeyRing.getPublicKey(String alias)
Returns the public key for the given alias.
|
Key |
KeyRing.getPublicKey(String alias,
String password)
Returns the public key for the given alias, using the provided password
to unlock it; the key pair (private/public) password can differ from that
of the key store it is kept in.
|
boolean |
KeyRing.isCertificateAlias(String alias)
Checks whether the alias has a corresponding certificate.
|
boolean |
KeyRing.isPrivateKeyAlias(String alias)
Checks whether the alias has a corresponding private key.
|
| Modifier and Type | Method and Description |
|---|---|
static List<X509Certificate> |
TrustAnchors.fromJavaRootCAs()
Attempts to load the certificates of the most trusted CAs ("root CAs") as
known to the Java Virtual Machine.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CertificateException
The base class for all exceptions related to certificate validity or
availability.
|
class |
CertificateLoaderException |
class |
CertificateVerificationException
This class wraps an exception that could be thrown during the certificate
verification process.
|
class |
InvalidPinException |
class |
LockedPinException |
class |
ProviderException
The root of the exception hierarchy in the Crypto library.
|
class |
SmartCardException
The root of the smart card provider-specific exceptions.
|
class |
UnavailableDriverException |
class |
UnsupportedFormatException |
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
Decryptor.decrypt(byte[] ciphertext)
Encrypts the given byte array, returning the encrypted bytes.
|
abstract boolean |
Decryptor.initialise(Object... parameters)
Initialises the class with a set of (optional) parameters.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
Pkcs7Decryptor.decrypt(byte[] ciphertext) |
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
Encryptor.encrypt(byte[] plaintext)
Encrypts the given byte array, returning the encrypted bytes.
|
byte[] |
EncryptZipFile.encrypt(byte[] plaintext,
String provider,
String url,
String name,
String filter) |
abstract boolean |
Encryptor.initialise(Object... parameters)
Initialises the class with a set of (optional) parameters.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
Pkcs7Encryptor.encrypt(byte[] plaintext) |
| Modifier and Type | Method and Description |
|---|---|
X509Certificate |
SigningStreamConfigurator.getCertificate()
Retrieves the signing certificate, possibly checking it against the list
of trust anchor certificates (if provided).
|
Key |
SigningStreamConfigurator.getPrivateKey()
Returns the private key corresponding to the given alias.
|
static Signer |
SignerFactory.makeSigner(EnvelopeFormat format,
String alias,
KeyRing keyring,
Provider provider,
SignatureAlgorithm algorithm)
Creates a signer of the given type, initialising it with the given
algorithm information and the given key store to access the private key.
|
abstract byte[] |
Signer.sign(byte[] data)
Signs the given set of data.
|
abstract void |
Signer.sign(InputStream input,
OutputStream output)
Signs the given set of data; the caller must make sure both input and
output stream are properly closed once the processing is complete.
|
| Constructor and Description |
|---|
Signer(String alias,
KeyRing keyring,
Provider provider)
Constructor.
|
SigningStream(OutputStream output,
SigningStreamConfigurator configurator)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
PDFSigner.sign(byte[] data) |
void |
PDFSigner.sign(InputStream input,
OutputStream output) |
| 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 |
|---|---|
byte[] |
PKCS7Signer.sign(byte[] data)
Signs the given byte array, returning the signed version.
|
void |
PKCS7Signer.sign(InputStream input,
OutputStream output)
Signs whatever can be read from the given input stream, writing the signed
version into the given output stream.
|
| Constructor and Description |
|---|
PKCS7Signer(String alias,
KeyRing keyring,
Provider provider,
SignatureAlgorithm algorithm)
Constructor.
|
PKCS7Signer(String alias,
KeyRing keyring,
Provider provider,
String digest,
String encryption)
Constructor.
|
PKCS7SigningStream(OutputStream output,
SigningStreamConfigurator configurator)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static Verifier |
VerifierFactory.makeVerifier(EnvelopeFormat format)
Creates a verifier of the given type.
|
abstract boolean |
Verifier.verify(byte[] signed)
Verifies that the signed data in the input array has not been tampered with.
|
abstract boolean |
Verifier.verify(byte[] data,
byte[] signature)
Verifies a detached signature, given the data upon which it was originally
calculated and the detached signature bytes.
|
abstract boolean |
Verifier.verify(InputStream signed)
Verifies the signature of the given set of encapsulated data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
PDFVerifier.verify(byte[] signed) |
boolean |
PDFVerifier.verify(byte[] signed,
byte[] data) |
boolean |
PDFVerifier.verify(InputStream signed) |
| Constructor and Description |
|---|
PDFVerifier(String alias,
KeyRing keyring,
Provider provider)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
PKCS7Verifier.verify(byte[] signed) |
boolean |
PKCS7Verifier.verify(byte[] signed,
byte[] data) |
boolean |
PKCS7Verifier.verify(InputStream signed) |
| Constructor and Description |
|---|
MicrosoftKeyRing(String password)
Constructor.
|
| Constructor and Description |
|---|
PKCS12KeyRing(File pkcs12,
String password)
Constructor.
|
PKCS12KeyRing(String pkcs12,
String password)
Constructor.
|
| Constructor and Description |
|---|
SmartCardKeyRing(Provider provider,
String password)
Constructor.
|
Copyright © 2012-2014 Andrea Funtò. See here for terms and conditions.