EncryptParameters Class
- java.
lang. Object - com.
azure. security. keyvault. keys. cryptography. models. EncryptParameters
- com.
public final class EncryptParameters
A class containing various configuration parameters that can be applied when performing encryption operations.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Encrypt |
createA128CbcPadParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A128CBCPAD. |
|
static
Encrypt |
createA128CbcPadParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A128CBCPAD. |
|
static
Encrypt |
createA128CbcParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A128CBC. |
|
static
Encrypt |
createA128CbcParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A128CBC. |
|
static
Encrypt |
createA128GcmParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A128GCM. |
|
static
Encrypt |
createA128GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
Factory method to create an instance of EncryptParameters with the given parameters for A128GCM. |
|
static
Encrypt |
createA192CbcPadParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A192CBCPAD. |
|
static
Encrypt |
createA192CbcPadParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A192CBCPAD. |
|
static
Encrypt |
createA192CbcParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A192CBC. |
|
static
Encrypt |
createA192CbcParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A192CBC. |
|
static
Encrypt |
createA192GcmParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A192GCM. |
|
static
Encrypt |
createA192GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
Factory method to create an instance of EncryptParameters with the given parameters for A192GCM. |
|
static
Encrypt |
createA256CbcPadParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A256CBCPAD. |
|
static
Encrypt |
createA256CbcPadParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A256CBCPAD. |
|
static
Encrypt |
createA256CbcParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A256CBC. |
|
static
Encrypt |
createA256CbcParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A256CBC. |
|
static
Encrypt |
createA256GcmParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A256GCM. |
|
static
Encrypt |
createA256GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
Factory method to create an instance of EncryptParameters with the given parameters for A256GCM. |
|
static
Encrypt |
createRsa15Parameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for RSA1_5. |
|
static
Encrypt |
createRsaOaep256Parameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for RSA_OAEP_256. |
|
static
Encrypt |
createRsaOaepParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for RSA_OAEP. |
| byte[] |
getAdditionalAuthenticatedData()
Get additional data to authenticate when performing encryption with an authenticated algorithm. |
|
Encryption |
getAlgorithm()
The algorithm to be used for encryption. |
| byte[] |
getIv()
Get the initialization vector to be used in the encryption operation using a symmetric algorithm. |
| byte[] |
getPlainText()
Get the content to be encrypted. |
Methods inherited from java.lang.Object
Method Details
createA128CbcPadParameters
public static EncryptParameters createA128CbcPadParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A128CBCPAD.
Parameters:
Returns:
createA128CbcPadParameters
public static EncryptParameters createA128CbcPadParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A128CBCPAD.
Parameters:
null, a cryptographically random IV will be
generated by Key Vault for service-side operations. For client-side operations,
SecureRandom will be used instead.
Returns:
createA128CbcParameters
public static EncryptParameters createA128CbcParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A128CBC.
Parameters:
Returns:
createA128CbcParameters
public static EncryptParameters createA128CbcParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A128CBC.
Parameters:
null, a cryptographically random IV will be
generated by Key Vault for service-side operations. For client-side operations,
SecureRandom will be used instead.
Returns:
createA128GcmParameters
public static EncryptParameters createA128GcmParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A128GCM.
Parameters:
Returns:
createA128GcmParameters
public static EncryptParameters createA128GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
Factory method to create an instance of EncryptParameters with the given parameters for A128GCM.
Parameters:
Returns:
createA192CbcPadParameters
public static EncryptParameters createA192CbcPadParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A192CBCPAD.
Parameters:
Returns:
createA192CbcPadParameters
public static EncryptParameters createA192CbcPadParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A192CBCPAD.
Parameters:
null, a cryptographically random IV will be
generated by Key Vault for service-side operations. For client-side operations,
SecureRandom will be used instead.
Returns:
createA192CbcParameters
public static EncryptParameters createA192CbcParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A192CBC.
Parameters:
Returns:
createA192CbcParameters
public static EncryptParameters createA192CbcParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A192CBC.
Parameters:
null, a cryptographically random IV will be
generated by Key Vault for service-side operations. For client-side operations,
SecureRandom will be used instead.
Returns:
createA192GcmParameters
public static EncryptParameters createA192GcmParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A192GCM.
Parameters:
Returns:
createA192GcmParameters
public static EncryptParameters createA192GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
Factory method to create an instance of EncryptParameters with the given parameters for A192GCM.
Parameters:
Returns:
createA256CbcPadParameters
public static EncryptParameters createA256CbcPadParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A256CBCPAD.
Parameters:
Returns:
createA256CbcPadParameters
public static EncryptParameters createA256CbcPadParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A256CBCPAD.
Parameters:
null, a cryptographically random IV will be
generated by Key Vault for service-side operations. For client-side operations,
SecureRandom will be used instead.
Returns:
createA256CbcParameters
public static EncryptParameters createA256CbcParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A256CBC.
Parameters:
Returns:
createA256CbcParameters
public static EncryptParameters createA256CbcParameters(byte[] plaintext, byte[] iv)
Factory method to create an instance of EncryptParameters with the given parameters for A256CBC.
Parameters:
null, a cryptographically random IV will be
generated by Key Vault for service-side operations. For client-side operations,
SecureRandom will be used instead.
Returns:
createA256GcmParameters
public static EncryptParameters createA256GcmParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for A256GCM.
Parameters:
Returns:
createA256GcmParameters
public static EncryptParameters createA256GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
Factory method to create an instance of EncryptParameters with the given parameters for A256GCM.
Parameters:
Returns:
createRsa15Parameters
public static EncryptParameters createRsa15Parameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for RSA1_5.
Parameters:
Returns:
createRsaOaep256Parameters
public static EncryptParameters createRsaOaep256Parameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for RSA_OAEP_256.
Parameters:
Returns:
createRsaOaepParameters
public static EncryptParameters createRsaOaepParameters(byte[] plaintext)
Factory method to create an instance of EncryptParameters with the given parameters for RSA_OAEP.
Parameters:
Returns:
getAdditionalAuthenticatedData
public byte[] getAdditionalAuthenticatedData()
Get additional data to authenticate when performing encryption with an authenticated algorithm.
Returns:
getAlgorithm
public EncryptionAlgorithm getAlgorithm()
The algorithm to be used for encryption.
Returns:
getIv
public byte[] getIv()
Get the initialization vector to be used in the encryption operation using a symmetric algorithm.
Returns:
getPlainText
public byte[] getPlainText()
Get the content to be encrypted.
Returns: