Package org.soulwing.s2ks
Interface KeyStorage
-
- All Known Subinterfaces:
MutableKeyStorage
public interface KeyStorageA key storage provider.- Author:
- Carl Harris
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.Keyretrieve(java.lang.String id)Retrieves a key.KeyWithMetadataretrieveWithMetadata(java.lang.String id)Retrieves a key and its associated metadata.
-
-
-
Method Detail
-
retrieve
java.security.Key retrieve(java.lang.String id) throws NoSuchKeyException, KeyUnwrapException, KeyStorageExceptionRetrieves a key.- Parameters:
id- unique identifier of the subject key- Returns:
- key object
- Throws:
NoSuchKeyException- if there is no key in storage with the given identifierKeyUnwrapException- if an error occurs in unwrapping the stored key; e.g. one of the myriad checked exceptions thrown by the JCA APIKeyStorageException- if the underlying storage mechanism cannot successfully read the wrapped key from persistent storage
-
retrieveWithMetadata
KeyWithMetadata retrieveWithMetadata(java.lang.String id) throws NoSuchKeyException, KeyUnwrapException, MetadataUnwrapException, KeyStorageException
Retrieves a key and its associated metadata.- Parameters:
id- unique identifier of the subject key- Returns:
- key-with-metadata object
- Throws:
NoSuchKeyException- if there is no key in storage with the given identifierKeyUnwrapException- if an error occurs in unwrapping the stored key; e.g. one of the myriad checked exceptions thrown by the JCA APIMetadataUnwrapException- if an error occurs in decoding the metadataKeyStorageException- if the underlying storage mechanism cannot successfully read the wrapped key from persistent storage
-
-