- java.lang.Object
-
- io.github.mmm.crypto.key.store.KeyStoreFacadeImpl
-
- All Implemented Interfaces:
KeyStoreFacade
public class KeyStoreFacadeImpl extends Object implements KeyStoreFacade
Implementation ofKeyStoreFacade.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description KeyStoreFacadeImpl(KeyStoreConfig config)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeySetgetKey(String alias, String keyPassword)KeyStoregetKeyStore()voidsave()Saves this key store with all changes.voidsetKey(String alias, AsymmetricKeyPair<?,?> keyPair, String password, CertificatePath certificatePath)voidsetKey(String alias, SecretKey key, String password)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.crypto.key.store.KeyStoreFacade
setKey
-
-
-
-
Constructor Detail
-
KeyStoreFacadeImpl
public KeyStoreFacadeImpl(KeyStoreConfig config)
The constructor.- Parameters:
config- theKeyStoreConfig.
-
-
Method Detail
-
getKeyStore
public KeyStore getKeyStore()
- Specified by:
getKeyStorein interfaceKeyStoreFacade- Returns:
- the underlying
KeyStore.
-
getKey
public KeySet getKey(String alias, String keyPassword)
- Specified by:
getKeyin interfaceKeyStoreFacade- Parameters:
alias- the alias under which the key pair shall be stored.keyPassword- the passphrase used to secure theKeySet.- Returns:
- the
KeySetloaded from the key store.
-
setKey
public void setKey(String alias, AsymmetricKeyPair<?,?> keyPair, String password, CertificatePath certificatePath)
- Specified by:
setKeyin interfaceKeyStoreFacade- Parameters:
alias- the alias under which the key pair shall be stored.keyPair- theAsymmetricKeyPairto store.password- the passphrase used to secure theKeySet.certificatePath- theCertificatePath.
-
setKey
public void setKey(String alias, SecretKey key, String password)
- Specified by:
setKeyin interfaceKeyStoreFacade- Parameters:
alias- the alias under which the key pair shall be stored.key- theSecretKeyto store.password- the passphrase used to secure theKeySet.
-
save
public void save()
Description copied from interface:KeyStoreFacadeSaves this key store with all changes.- Specified by:
savein interfaceKeyStoreFacade
-
-