Package org.soulwing.s2ks
Interface MutableKeyStorage
-
- All Superinterfaces:
KeyStorage
public interface MutableKeyStorage extends KeyStorage
AKeyStorageprovider that provides the ability to store new keys at runtime.- Author:
- Carl Harris
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidstore(java.lang.String id, java.security.Key key)Stores a key using the given identifier, replacing any existing key with the same identifier.voidstore(java.lang.String id, KeyWithMetadata keyWithMetadata)Stores a key and associated metadata using the given identifier, replacing any existing key and metadata with the same identifier.-
Methods inherited from interface org.soulwing.s2ks.KeyStorage
retrieve, retrieveWithMetadata
-
-
-
-
Method Detail
-
store
void store(java.lang.String id, java.security.Key key) throws KeyWrapException, KeyStorageExceptionStores a key using the given identifier, replacing any existing key with the same identifier.- Parameters:
id- identifier for the subject keykey- the subject key- Throws:
KeyWrapException- if an error occurs in wrapping the key; e.g. one of the myriad checked exceptions thrown by the JCA APIKeyStorageException- if the underlying storage mechanism cannot successfully write the wrapped key to persistent storage
-
store
void store(java.lang.String id, KeyWithMetadata keyWithMetadata) throws KeyWrapException, KeyStorageExceptionStores a key and associated metadata using the given identifier, replacing any existing key and metadata with the same identifier.- Parameters:
id- identifier for the subject keykeyWithMetadata- the subject key and metadata- Throws:
KeyWrapException- if an error occurs in wrapping the key; e.g. one of the myriad checked exceptions thrown by the JCA APIMetadataWrapException- if an error occurs in encoding the metadataKeyStorageException- if the underlying storage mechanism cannot successfully write the wrapped key to persistent storage
-
-