public class DefaultCryptingDelegateFactory extends Object implements ICryptingDelegateFactory
| Modifier and Type | Field and Description |
|---|---|
static DefaultCryptingDelegateFactory |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createCryptingDelegate()
Creates and initializes the crypting delegate.
|
String |
getAlgorithm()
Returns the algorithm.
|
protected XMLConfiguration |
getConfiguration()
Returns the configuration.
|
ICryptingDelegate |
getCryptingDelegate()
Returns a crypting delegate.
|
protected String |
getDelegateClassName()
Returns the name of the delegate class.
|
static ICryptingDelegateFactory |
getInstance()
Returns the crypting delegate factory.
|
protected String |
getKeyAlias()
Returns the public key alias in key store.
|
KeyPair |
getKeyPair()
Returns the keyPair.
|
protected char[] |
getKeyPassword()
Return the public key password
|
protected byte[] |
getKeySalt()
Return the public key salt.
|
protected KeyStore |
getKeyStore()
Returns the key store.
|
protected SubnodeConfiguration |
getKeyStoreConfig()
Returns the configuration for the keystore.
|
protected char[] |
getKeyStorePassword()
Return the key store password
|
protected String |
getKeyStorePath()
Returns the key store path.
|
protected String |
getKeyStoreType()
Returns the key store path.
|
AlgorithmParameterSpec |
getParamSpec()
Returns the paramSpec.
|
char[] |
getPassphrase()
Alternatively provide a passphrase for encryption usage.
|
protected char[] |
getPassword(String type)
Asks the respective callback to deliver a password.
|
protected IPasswordCallback |
getPasswordCallback(String type)
Returns a callback for the given type.
|
protected SubnodeConfiguration |
getPasswordCallbackConfig(String type)
Returns the configuration for the password callback.
|
byte[] |
getSalt()
Provide a salt for encryption usage.
|
protected byte[] |
getSalt(String type)
Asks the respective callback to deliver a salt.
|
protected void |
init()
Initializes this factory.
|
protected String |
loadAlgorithm(Configuration config)
Returns the algorithm definition from the config
|
protected AlgorithmParameterSpec |
loadParamSpec(Configuration config)
Currently only default PBE spec.
|
protected void |
loadSpec()
Loads the spec params (lazily).
|
void |
setAlgorithm(String algorithm)
Sets the algorithm.
|
void |
setKeyPair(KeyPair keyPair)
Sets the keyPair.
|
void |
setParamSpec(AlgorithmParameterSpec paramSpec)
Sets the paramSpec.
|
public static final DefaultCryptingDelegateFactory INSTANCE
public static ICryptingDelegateFactory getInstance()
protected void init()
protected void loadSpec()
protected XMLConfiguration getConfiguration()
protected String getDelegateClassName()
protected IPasswordCallback getPasswordCallback(String type)
type - type of password callbackprotected SubnodeConfiguration getPasswordCallbackConfig(String type)
type - type of callbackprotected char[] getPassword(String type)
type - type of callbackprotected byte[] getKeySalt()
public byte[] getSalt()
getSalt in interface ICryptingDelegateFactoryprotected byte[] getSalt(String type)
type - type of callbackprotected SubnodeConfiguration getKeyStoreConfig()
protected KeyStore getKeyStore() throws IOException
IOExceptionprotected String getKeyStoreType()
protected String getKeyStorePath()
protected char[] getKeyStorePassword()
protected String getKeyAlias()
protected char[] getKeyPassword()
public char[] getPassphrase()
getPassphrase in interface ICryptingDelegateFactorypublic ICryptingDelegate getCryptingDelegate()
getCryptingDelegate in interface ICryptingDelegateFactoryprotected void createCryptingDelegate()
public KeyPair getKeyPair()
getKeyPair in interface ICryptingDelegateFactorypublic void setKeyPair(KeyPair keyPair)
keyPair - the keyPair to setpublic String getAlgorithm()
getAlgorithm in interface ICryptingDelegateFactorypublic void setAlgorithm(String algorithm)
algorithm - the algorithm to setprotected String loadAlgorithm(Configuration config)
config - the configpublic AlgorithmParameterSpec getParamSpec()
getParamSpec in interface ICryptingDelegateFactorypublic void setParamSpec(AlgorithmParameterSpec paramSpec)
paramSpec - the paramSpec to setprotected AlgorithmParameterSpec loadParamSpec(Configuration config)
config - configuration to load fromCopyright © 2014. All rights reserved.