public class KeyStoreFacadeImpl extends Object implements KeyStoreFacade
KeyStoreFacade.| Modifier and Type | Field and Description |
|---|---|
private KeyStoreConfig |
config |
private KeyStore |
keyStore |
private static Certificate[] |
NO_CHAIN |
private char[] |
password |
| Constructor and Description |
|---|
KeyStoreFacadeImpl(KeyStoreConfig config)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private static char[] |
getChars(String password) |
KeySet |
getKey(String alias,
String keyPassword) |
KeyStore |
getKeyStore() |
void |
save()
Saves this key store with all changes.
|
void |
setKey(String alias,
AsymmetricKeyPair<?,?> keyPair,
String password,
CertificatePath certificatePath) |
void |
setKey(String alias,
SecretKey key,
String password) |
private void |
setKeyPairInternal(String alias,
Key secureKey,
String password,
CertificatePath certificatePath) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetKeyprivate static final Certificate[] NO_CHAIN
private final KeyStoreConfig config
private final char[] password
private KeyStore keyStore
public KeyStoreFacadeImpl(KeyStoreConfig config)
config - the KeyStoreConfig.private static char[] getChars(String password)
public KeyStore getKeyStore()
getKeyStore in interface KeyStoreFacadeKeyStore.public KeySet getKey(String alias, String keyPassword)
getKey in interface KeyStoreFacadealias - the alias under which the key pair shall be stored.keyPassword - the passphrase used to secure the KeySet.KeySet loaded from the key store.public void setKey(String alias, AsymmetricKeyPair<?,?> keyPair, String password, CertificatePath certificatePath)
setKey in interface KeyStoreFacadealias - the alias under which the key pair shall be stored.keyPair - the AsymmetricKeyPair to store.password - the passphrase used to secure the KeySet.certificatePath - the CertificatePath.public void setKey(String alias, SecretKey key, String password)
setKey in interface KeyStoreFacadealias - the alias under which the key pair shall be stored.key - the SecretKey to store.password - the passphrase used to secure the KeySet.private void setKeyPairInternal(String alias, Key secureKey, String password, CertificatePath certificatePath)
public void save()
KeyStoreFacadesave in interface KeyStoreFacadeCopyright © 2001–2019 mmm-Team. All rights reserved.