Class SimpleKeyFile
java.lang.Object
org.jpos.security.SimpleKeyFile
- All Implemented Interfaces:
Configurable, SecureKeyStore, LogSource
Implements SecureKeyStore using a properties file.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface SecureKeyStore
SecureKeyStore.SecureKeyStoreException -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the key assiciated with the given alias.getKeys()Returns map of existing keys assiciated with aliases.getProperty(String alias, String subName) getRealm()voidvoidvoidAssigns the given key to the given alias.voidvoidsetProperty(String alias, String subName, String value)
-
Field Details
-
logger
-
realm
-
-
Constructor Details
-
SimpleKeyFile
public SimpleKeyFile() -
SimpleKeyFile
-
-
Method Details
-
init
-
setLogger
-
getLogger
-
getRealm
-
setConfiguration
- Specified by:
setConfigurationin interfaceConfigurable- Parameters:
cfg- configuration object- Throws:
ConfigurationException
-
getKey
Description copied from interface:SecureKeyStoreReturns the key assiciated with the given alias.- Specified by:
getKeyin interfaceSecureKeyStore- Parameters:
alias- the alias name- Returns:
- the requested key, or
nullif the given alias does not exist. - Throws:
SecureKeyStore.SecureKeyStoreException- if SecureKeyStore is not initialized or if the operation fails for some other reason.
-
setKey
Description copied from interface:SecureKeyStoreAssigns the given key to the given alias. If the given alias already exists, the keystore information associated with it is overridden by the given key.- Specified by:
setKeyin interfaceSecureKeyStore- Parameters:
alias- the alias namesecureKey- the key to be associated with the alias- Throws:
SecureKeyStore.SecureKeyStoreException- if SecureKeyStore is not initialized or the key can't be recovered.
-
getProperty
public String getProperty(String alias, String subName) throws SecureKeyStore.SecureKeyStoreException -
setProperty
-
getKeys
Description copied from interface:SecureKeyStoreReturns map of existing keys assiciated with aliases.- Specified by:
getKeysin interfaceSecureKeyStore- Returns:
- map of existing keys assiciated with aliases.
- Throws:
SecureKeyStore.SecureKeyStoreException- if SecureKeyStore is not initialized or if the operation fails for some other reason.
-