- 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 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)
String
toString()
-
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:
getKeyStore
in interfaceKeyStoreFacade
- Returns:
- the underlying
KeyStore
.
-
getKey
public KeySet getKey(String alias, String keyPassword)
- Specified by:
getKey
in interfaceKeyStoreFacade
- Parameters:
alias
- the alias under which the key pair shall be stored.keyPassword
- the passphrase used to secure theKeySet
.- Returns:
- the
KeySet
loaded from the key store.
-
setKey
public void setKey(String alias, AsymmetricKeyPair<?,?> keyPair, String password, CertificatePath certificatePath)
- Specified by:
setKey
in interfaceKeyStoreFacade
- Parameters:
alias
- the alias under which the key pair shall be stored.keyPair
- theAsymmetricKeyPair
to store.password
- the passphrase used to secure theKeySet
.certificatePath
- theCertificatePath
.
-
setKey
public void setKey(String alias, SecretKey key, String password)
- Specified by:
setKey
in interfaceKeyStoreFacade
- Parameters:
alias
- the alias under which the key pair shall be stored.key
- theSecretKey
to store.password
- the passphrase used to secure theKeySet
.
-
save
public void save()
Description copied from interface:KeyStoreFacade
Saves this key store with all changes.- Specified by:
save
in interfaceKeyStoreFacade
-
-