public class KeyStoreMaterialsProvider extends java.lang.Object implements EncryptionMaterialsProvider
| Constructor and Description |
|---|
KeyStoreMaterialsProvider(java.security.KeyStore keyStore,
java.lang.String encryptionAlias,
java.lang.String signingAlias,
java.security.KeyStore.ProtectionParameter encryptionProtection,
java.security.KeyStore.ProtectionParameter signingProtection,
java.util.Map<java.lang.String,java.lang.String> description) |
KeyStoreMaterialsProvider(java.security.KeyStore keyStore,
java.lang.String encryptionAlias,
java.lang.String signingAlias,
java.util.Map<java.lang.String,java.lang.String> description) |
| Modifier and Type | Method and Description |
|---|---|
DecryptionMaterials |
getDecryptionMaterials(EncryptionContext context)
Retrieves encryption materials matching the specified description from some source.
|
EncryptionMaterials |
getEncryptionMaterials(EncryptionContext context)
Returns EncryptionMaterials which the caller can use for encryption.
|
void |
refresh()
Reloads the keys from the underlying keystore by calling
KeyStore.getEntry(String,
ProtectionParameter) again for each of them. |
public KeyStoreMaterialsProvider(java.security.KeyStore keyStore,
java.lang.String encryptionAlias,
java.lang.String signingAlias,
java.util.Map<java.lang.String,java.lang.String> description)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.UnrecoverableEntryException
java.security.KeyStoreExceptionjava.security.NoSuchAlgorithmExceptionjava.security.UnrecoverableEntryExceptionpublic KeyStoreMaterialsProvider(java.security.KeyStore keyStore,
java.lang.String encryptionAlias,
java.lang.String signingAlias,
java.security.KeyStore.ProtectionParameter encryptionProtection,
java.security.KeyStore.ProtectionParameter signingProtection,
java.util.Map<java.lang.String,java.lang.String> description)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.UnrecoverableEntryException
java.security.KeyStoreExceptionjava.security.NoSuchAlgorithmExceptionjava.security.UnrecoverableEntryExceptionpublic DecryptionMaterials getDecryptionMaterials(EncryptionContext context)
EncryptionMaterialsProvidergetDecryptionMaterials in interface EncryptionMaterialsProvidercontext - Information to assist in selecting a the proper return value. The implementation
is free to determine the minimum necessary for successful processing.public EncryptionMaterials getEncryptionMaterials(EncryptionContext context)
EncryptionMaterialsProvidergetEncryptionMaterials in interface EncryptionMaterialsProvidercontext - Information to assist in selecting a the proper return value. The implementation
is free to determine the minimum necessary for successful processing.public void refresh()
KeyStore.getEntry(String,
ProtectionParameter) again for each of them.refresh in interface EncryptionMaterialsProvider