T - the concrete type of this objectpublic interface AlgorithmParameters<T extends AlgorithmParameters<T>>
| Modifier and Type | Method and Description |
|---|---|
AlgorithmParameterSpec |
createParameterSpec(byte[] parameterData)
Generates an algorithm-specific
AlgorithmParameterSpec object used to hold algorithm
parameters such as an initialization vector or salt. |
byte[] |
generateParameterSpecData()
Generates a byte array which holds algorithm parameters such as an initialization vector or
salt.
|
String |
getAlgorithm()
Returns the algorithm value.
|
Key |
getDecryptionKey()
Returns the key used for decryption.
|
Key |
getEncryptionKey()
Returns the key used for encryption.
|
int |
getKeySize()
Returns the size of the key to be generated in bits.
|
String |
getMacAlgorithm()
Returns the macAlgorithm value.
|
Key |
getMacKey()
Returns the macKey.
|
int |
getMacKeySize()
Returns the size of the MAC key to be generated in bits.
|
AlgorithmParameterSpec |
getParameterSpec(byte[] messageData)
Returns an algorithm-specific
AlgorithmParameterSpec object used to hold algorithm
parameters such as an initialization vector or salt from the enciphered message. |
int |
getParameterSpecSize()
Returns the algorithm parameter data size.
|
Provider |
getProvider()
Returns the Java Security Provider.
|
String |
getProviderName()
Returns the Java Security Provider name.
|
String |
getTransformation()
Returns the transformation value.
|
T |
setKeySize(int keySize)
Sets the size of the key in bits to be generated during initialization.
|
T |
setMacAlgorithm(String macAlgorithm)
Sets the macAlgorithm value.
|
T |
setMacKey(byte[] macKey)
Sets the raw byte array of the MAC key.
|
T |
setMacKey(Key macKey)
Sets the macKey.
|
T |
setMacKey(String macKey)
Sets the macKey.
|
T |
setMacKeyLoader(Object macKeyLoader)
Sets the
KeyLoader, which is used to load the cipher key for the MAC. |
T |
setMacKeySize(int macKeySize)
Sets the size of the MAC key in bits to be generated during initialization.
|
T |
setProvider(Provider provider)
Sets the Java Security Provider.
|
T |
setProviderName(String providerName)
Sets the Java Security Provider name.
|
T |
setSaltGenerator(SaltGenerator saltGenerator)
Sets the
SaltGenerator, which allows for custom salt data generation. |
T |
setSaltMatcher(SaltMatcher saltMatcher)
Sets the
SaltMatcher, which may be used to verify the salt within the cipher text matches some
expected value. |
String getAlgorithm()
String getTransformation()
Key getEncryptionKey() throws GeneralSecurityException
GeneralSecurityException - GeneralSecurityExceptionKey getDecryptionKey() throws GeneralSecurityException
GeneralSecurityException - GeneralSecurityExceptionbyte[] generateParameterSpecData()
AlgorithmParameterSpec createParameterSpec(byte[] parameterData)
AlgorithmParameterSpec object used to hold algorithm
parameters such as an initialization vector or salt.parameterData - the data for the AlgorithmParameterSpecAlgorithmParameterSpec objectAlgorithmParameterSpec getParameterSpec(byte[] messageData) throws GeneralSecurityException
AlgorithmParameterSpec object used to hold algorithm
parameters such as an initialization vector or salt from the enciphered message.messageData - the message data byte array which holds the parameter dataAlgorithmParameterSpec objectGeneralSecurityException - GeneralSecurityExceptionint getParameterSpecSize()
int getKeySize()
T setKeySize(int keySize)
keySize - The keySize to set.int getMacKeySize()
T setMacKeySize(int macKeySize)
macKeySize - The macKeySize to set.Key getMacKey() throws GeneralSecurityException
GeneralSecurityException - GeneralSecurityExceptionT setMacKey(byte[] macKey)
macKey - The macKey to set.T setMacKey(String macKey)
macKey - The macKey to set.T setMacKey(Key macKey)
macKey - The macKey to set.String getMacAlgorithm()
T setMacAlgorithm(String macAlgorithm)
macAlgorithm - The macAlgorithm to set.String getProviderName()
T setProviderName(String providerName)
providerName - The providerName to set.Provider getProvider()
T setProvider(Provider provider)
provider - The provider to set.T setMacKeyLoader(Object macKeyLoader)
KeyLoader, which is used to load the cipher key for the MAC. The value may
either be the full class name of a KeyLoader implementation or an actual
KeyLoader instance.macKeyLoader - The macKeyLoader to set.T setSaltGenerator(SaltGenerator saltGenerator)
SaltGenerator, which allows for custom salt data generation.saltGenerator - the saltGenerator to setT setSaltMatcher(SaltMatcher saltMatcher)
SaltMatcher, which may be used to verify the salt within the cipher text matches some
expected value.saltMatcher - the saltMatcher to set