public class KeystoreKeyProvider extends BasicKeyProvider
| Constructor and Description |
|---|
KeystoreKeyProvider(java.security.KeyStore keyStore,
char[] keyStorePass,
java.lang.String masterKeyAlias)
Loads all key pairs from the specified key store and identifies the master key by the specified alias.
|
| Modifier and Type | Method and Description |
|---|---|
java.security.KeyPair |
getKeyFromAlias(java.lang.String alias) |
void |
setMasterKeyAlias(java.lang.String masterKeyAlias) |
addKey, getFingerprint, getKey, getMasterKey, getMasterKeyFingerprint, getProvider, removeKey, setMasterKey, setProvider, withKeys, withMasterKey, withProviderpublic KeystoreKeyProvider(java.security.KeyStore keyStore,
char[] keyStorePass,
java.lang.String masterKeyAlias)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.UnrecoverableKeyException
This assumes that all keys share the same password.
java.security.KeyStoreExceptionjava.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.security.UnrecoverableKeyExceptionpublic void setMasterKeyAlias(java.lang.String masterKeyAlias)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.UnrecoverableKeyException
java.security.KeyStoreExceptionjava.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.security.UnrecoverableKeyExceptionpublic java.security.KeyPair getKeyFromAlias(java.lang.String alias)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.UnrecoverableKeyException
java.security.KeyStoreExceptionjava.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.security.UnrecoverableKeyException