T - the concrete type of this objectpublic abstract class AbstractAsymmetricAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>> extends AbstractAlgorithmParameters<T> implements AsymmetricAlgorithmParameters<T>
KEY_SIZE_128, KEY_SIZE_192, KEY_SIZE_256, MAC_ALGORITHM_HMAC_MD5, MAC_ALGORITHM_HMAC_SHA1, MAC_ALGORITHM_HMAC_SHA224, MAC_ALGORITHM_HMAC_SHA256, MAC_ALGORITHM_HMAC_SHA3_224, MAC_ALGORITHM_HMAC_SHA3_256, MAC_ALGORITHM_HMAC_SHA3_384, MAC_ALGORITHM_HMAC_SHA3_512, MAC_ALGORITHM_HMAC_SHA384, MAC_ALGORITHM_HMAC_SHA512, MAC_ALGORITHM_HMAC_SHA512_224, MAC_ALGORITHM_HMAC_SHA512_256, MAC_KEY_SIZE_128, MAC_KEY_SIZE_160| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAsymmetricAlgorithmParameters()
Initializes the AbstractAsymmetricAlgorithmParameters.
|
protected |
AbstractAsymmetricAlgorithmParameters(TextEncoder textEncoder)
Initializes the AbstractAsymmetricAlgorithmParameters with a
TextEncoder which is used to
decode the key when set as a string. |
| Modifier and Type | Method and Description |
|---|---|
String |
getBlockType()
Returns the blockType value.
|
String |
getPadding()
Returns the padding value.
|
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.
|
String |
getTransformation()
Returns the transformation value.
|
protected Key |
loadKey(byte[] rawKey,
KeyLoader keyLoader,
String algorithm)
Loads a key from the given possible key sources.
|
T |
setBlockType(String blockType)
Sets the blockType value.
|
T |
setDecryptionKey(Key decryptionKey)
Sets the decryption key.
|
T |
setDecryptionKeyLoader(Object decryptionKeyLoader)
Sets the
KeyLoader, which is used to load the decryption key. |
T |
setEncryptionKey(Key encryptionKey)
Sets the encryption key.
|
T |
setEncryptionKeyLoader(Object encryptionKeyLoader)
Sets the
KeyLoader, which is used to load the encryption key. |
T |
setPadding(String padding)
Sets the padding value.
|
createParameterSpec, generateParameterSpecData, getAlgorithm, getDecryptionKey, getDefaultAlgorithm, getDefaultKeySize, getEncryptionKey, getKeySize, getMacAlgorithm, getMacKey, getMacKeySize, getProvider, getProviderName, hasDecryptionKey, hasEncryptionKey, parseAndVerifySalt, setAlgorithm, setDecryptionKey, setDecryptionKey, setEncryptionKey, setEncryptionKey, setKeySize, setMacAlgorithm, setMacKey, setMacKey, setMacKey, setMacKeyLoader, setMacKeySize, setProvider, setProviderName, setSaltGenerator, setSaltMatcherclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateParameterSpec, generateParameterSpecData, getAlgorithm, getDecryptionKey, getEncryptionKey, getKeySize, getMacAlgorithm, getMacKey, getMacKeySize, getProvider, getProviderName, setKeySize, setMacAlgorithm, setMacKey, setMacKey, setMacKey, setMacKeyLoader, setMacKeySize, setProvider, setProviderName, setSaltGenerator, setSaltMatcherprotected AbstractAsymmetricAlgorithmParameters()
protected AbstractAsymmetricAlgorithmParameters(TextEncoder textEncoder)
TextEncoder which is used to
decode the key when set as a string.textEncoder - the TextEncoderprotected Key loadKey(byte[] rawKey, KeyLoader keyLoader, String algorithm) throws GeneralSecurityException
loadKey in class AbstractAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>rawKey - the raw key bytes (may be null)keyLoader - the keyLoader (may be null)algorithm - the algorithm for the keyGeneralSecurityException - GeneralSecurityExceptionpublic T setEncryptionKey(Key encryptionKey)
setEncryptionKey in interface AsymmetricAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>setEncryptionKey in class AbstractAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>encryptionKey - The encryptionKey to set.public T setEncryptionKeyLoader(Object encryptionKeyLoader)
KeyLoader, which is used to load the encryption key. The value may either be the
full class name of a KeyLoader implementation or an actual KeyLoader
instance.setEncryptionKeyLoader in interface AsymmetricAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>setEncryptionKeyLoader in class AbstractAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>encryptionKeyLoader - The encryptionKeyLoader to set.public T setDecryptionKey(Key decryptionKey)
setDecryptionKey in interface AsymmetricAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>setDecryptionKey in class AbstractAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>decryptionKey - The decryptionKey to set.public T setDecryptionKeyLoader(Object decryptionKeyLoader)
KeyLoader, which is used to load the decryption key. The value may either be the
full class name of a KeyLoader implementation or an actual KeyLoader
instance.setDecryptionKeyLoader in interface AsymmetricAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>setDecryptionKeyLoader in class AbstractAlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>decryptionKeyLoader - The decryptionKeyLoader to set.public AlgorithmParameterSpec getParameterSpec(byte[] messageData) throws GeneralSecurityException
AlgorithmParameterSpec object used to hold algorithm
parameters such as an initialization vector or salt from the enciphered message.getParameterSpec in interface AlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>messageData - the message data byte array which holds the parameter dataAlgorithmParameterSpec objectGeneralSecurityException - GeneralSecurityExceptionpublic int getParameterSpecSize()
getParameterSpecSize in interface AlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>public String getTransformation()
getTransformation in interface AlgorithmParameters<T extends AbstractAsymmetricAlgorithmParameters<T>>public String getBlockType()
public T setBlockType(String blockType)
blockType - The blockType to set.public String getPadding()