public interface SecureKeyStore
Represents a collection of Secure Keys and typically stores them in some persistent storage. SecureKeyStore isolates from particular DB implementations. A Secure Key Store need not implement any security itself, it just holds keys that are inherently secure (like SecureDESKey).
Note: SecureKeyStore doesn't have any relation with java.security.KeyStore SecureKeyStore works on objects of type org.jpos.security.SecureKey
SecureKey
Modifier and Type | Interface and Description |
---|---|
static class |
SecureKeyStore.SecureKeyStoreException |
Modifier and Type | Method and Description |
---|---|
<T extends SecureKey> |
getKey(java.lang.String alias)
Returns the key assiciated with the given alias.
|
<T extends SecureKey> |
getKeys()
Returns map of existing keys assiciated with aliases.
|
void |
setKey(java.lang.String alias,
SecureKey key)
Assigns the given key to the given alias.
|
<T extends SecureKey> T getKey(java.lang.String alias) throws SecureKeyStore.SecureKeyStoreException
T
- desired type of requested keyalias
- the alias namenull
if the given alias does not exist.SecureKeyStore.SecureKeyStoreException
- if SecureKeyStore is not initialized or if
the operation fails for some other reason.void setKey(java.lang.String alias, SecureKey key) throws SecureKeyStore.SecureKeyStoreException
alias
- the alias namekey
- the key to be associated with the aliasSecureKeyStore.SecureKeyStoreException
- if SecureKeyStore is not initialized or the key
can't be recovered.<T extends SecureKey> java.util.Map<java.lang.String,T> getKeys() throws SecureKeyStore.SecureKeyStoreException
T
- desired type of requested keysSecureKeyStore.SecureKeyStoreException
- if SecureKeyStore is not initialized or if
the operation fails for some other reason.