T
- Type of key, either SecretKey
or PrivateKey
.public class KeyStoreBasedKeyFactoryBean<T extends Key> extends Object implements FactoryBean<T>
Constructor and Description |
---|
KeyStoreBasedKeyFactoryBean()
Creates a new instance.
|
KeyStoreBasedKeyFactoryBean(KeyStore keyStore,
String alias,
String password)
Creates a new instance by specifying all properties.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlias() |
KeyStore |
getKeyStore() |
T |
newInstance() |
void |
setAlias(String alias)
Sets the alias that specifies the
KeyStore entry containing the key. |
void |
setKeyStore(KeyStore keyStore)
Sets the keystore that contains the key.
|
void |
setPassword(String password)
Sets the password used to access the key entry.
|
public KeyStoreBasedKeyFactoryBean()
public KeyStoreBasedKeyFactoryBean(KeyStore keyStore, String alias, String password)
keyStore
- Key store containing encryption key.alias
- Name of encryption key entry in key store.password
- Password used to decrypt key entry in keystore.public void setKeyStore(KeyStore keyStore)
keyStore
- Non-null keystore.public String getAlias()
KeyStore
entry containing the key.public void setAlias(String alias)
KeyStore
entry containing the key.alias
- Keystore alias of key entry.public void setPassword(String password)
password
- Key entry password.public T newInstance()
newInstance
in interface FactoryBean<T extends Key>
Copyright © 2003-2024 Virginia Tech. All Rights Reserved.