public abstract class KeyProviderExtension<E extends KeyProviderExtension.Extension> extends KeyProvider
| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
KeyProviderExtension.Extension
A marker interface for the KeyProviderExtension subclass implement. 
 | 
KeyProvider.KeyVersion, KeyProvider.Metadata, KeyProvider.OptionsDEFAULT_BITLENGTH, DEFAULT_BITLENGTH_NAME, DEFAULT_CIPHER, DEFAULT_CIPHER_NAME| Constructor and Description | 
|---|
KeyProviderExtension(KeyProvider keyProvider,
                    E extensions)  | 
| Modifier and Type | Method and Description | 
|---|---|
KeyProvider.KeyVersion | 
createKey(String name,
         byte[] material,
         KeyProvider.Options options)
Create a new key. 
 | 
KeyProvider.KeyVersion | 
createKey(String name,
         KeyProvider.Options options)
Create a new key generating the material for it. 
 | 
void | 
deleteKey(String name)
Delete the given key. 
 | 
void | 
flush()
Ensures that any changes to the keys are written to persistent store. 
 | 
KeyProvider.KeyVersion | 
getCurrentKey(String name)
Get the current version of the key, which should be used for encrypting new
 data. 
 | 
protected E | 
getExtension()  | 
protected KeyProvider | 
getKeyProvider()  | 
List<String> | 
getKeys()
Get the key names for all keys. 
 | 
KeyProvider.Metadata[] | 
getKeysMetadata(String... names)
Get key metadata in bulk. 
 | 
KeyProvider.KeyVersion | 
getKeyVersion(String versionName)
Get the key material for a specific version of the key. 
 | 
List<KeyProvider.KeyVersion> | 
getKeyVersions(String name)
Get the key material for all versions of a specific key name. 
 | 
KeyProvider.Metadata | 
getMetadata(String name)
Get metadata about the key. 
 | 
boolean | 
isTransient()
Indicates whether this provider represents a store
 that is intended for transient use - such as the UserProvider
 is. 
 | 
KeyProvider.KeyVersion | 
rollNewVersion(String name)
Roll a new version of the given key generating the material for it. 
 | 
KeyProvider.KeyVersion | 
rollNewVersion(String name,
              byte[] material)
Roll a new version of the given key. 
 | 
String | 
toString()  | 
buildVersionName, close, findProvider, generateKey, getBaseName, getConf, needsPassword, noPasswordError, noPasswordWarning, optionspublic KeyProviderExtension(KeyProvider keyProvider, E extensions)
protected E getExtension()
protected KeyProvider getKeyProvider()
public boolean isTransient()
KeyProviderisTransient in class KeyProviderpublic KeyProvider.Metadata[] getKeysMetadata(String... names) throws IOException
KeyProvidergetKeysMetadata in class KeyProvidernames - the names of the keys to getIOExceptionpublic KeyProvider.KeyVersion getCurrentKey(String name) throws IOException
KeyProvidergetCurrentKey in class KeyProvidername - the base name of the keyIOExceptionpublic KeyProvider.KeyVersion createKey(String name, KeyProvider.Options options) throws NoSuchAlgorithmException, IOException
KeyProviderKeyProvider.createKey(String, byte[], Options) method.createKey in class KeyProvidername - the base name of the keyoptions - the options for the new key.NoSuchAlgorithmExceptionIOExceptionpublic KeyProvider.KeyVersion rollNewVersion(String name) throws NoSuchAlgorithmException, IOException
KeyProviderKeyProvider.rollNewVersion(String, byte[]) method.rollNewVersion in class KeyProvidername - the basename of the keyIOExceptionNoSuchAlgorithmExceptionpublic KeyProvider.KeyVersion getKeyVersion(String versionName) throws IOException
KeyProvidergetKeyVersion in class KeyProviderversionName - the name of a specific version of the keyIOExceptionpublic List<String> getKeys() throws IOException
KeyProvidergetKeys in class KeyProviderIOExceptionpublic List<KeyProvider.KeyVersion> getKeyVersions(String name) throws IOException
KeyProvidergetKeyVersions in class KeyProviderIOExceptionpublic KeyProvider.Metadata getMetadata(String name) throws IOException
KeyProvidergetMetadata in class KeyProvidername - the basename of the keyIOExceptionpublic KeyProvider.KeyVersion createKey(String name, byte[] material, KeyProvider.Options options) throws IOException
KeyProvidercreateKey in class KeyProvidername - the base name of the keymaterial - the key material for the first version of the key.options - the options for the new key.IOExceptionpublic void deleteKey(String name) throws IOException
KeyProviderdeleteKey in class KeyProvidername - the name of the key to deleteIOExceptionpublic KeyProvider.KeyVersion rollNewVersion(String name, byte[] material) throws IOException
KeyProviderrollNewVersion in class KeyProvidername - the basename of the keymaterial - the new key materialIOExceptionpublic void flush()
           throws IOException
KeyProviderflush in class KeyProviderIOExceptionCopyright © 2018 Apache Software Foundation. All Rights Reserved.