Class SymmetricEncryptionAlgorithm
- java.lang.Object
-
- com.microsoft.azure.keyvault.cryptography.Algorithm
-
- com.microsoft.azure.keyvault.cryptography.EncryptionAlgorithm
-
- com.microsoft.azure.keyvault.cryptography.SymmetricEncryptionAlgorithm
-
- Direct Known Subclasses:
AesCbc,AesCbcHmacSha2
public abstract class SymmetricEncryptionAlgorithm extends EncryptionAlgorithm
Abstract base class for all symmetric encryption algorithms.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSymmetricEncryptionAlgorithm(String name)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract ICryptoTransformCreateDecryptor(byte[] key, byte[] iv, byte[] authenticationData, byte[] authenticationTag)Creates aICryptoTransformimplementation for decryption using the supplied initialization vector and the specific provider for the Java Security API.abstract ICryptoTransformCreateDecryptor(byte[] key, byte[] iv, byte[] authenticationData, byte[] authenticationTag, Provider provider)Creates aICryptoTransformimplementation for decryption using the supplied initialization vector and the specific provider for the Java Security API.abstract ICryptoTransformCreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData)Creates aICryptoTransformimplementation for encryption using the supplied initialization vector and the specific provider for the Java Security API.abstract ICryptoTransformCreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData, Provider provider)Creates aICryptoTransformimplementation for encryption using the supplied initialization vector and the specific provider for the Java Security API.
-
-
-
Constructor Detail
-
SymmetricEncryptionAlgorithm
protected SymmetricEncryptionAlgorithm(String name)
Constructor.- Parameters:
name- The name of the algorithm.
-
-
Method Detail
-
CreateEncryptor
public abstract ICryptoTransform CreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException
Creates aICryptoTransformimplementation for encryption using the supplied initialization vector and the specific provider for the Java Security API.- Parameters:
key- The key material to be used.iv- The initialization vector to be used.authenticationData- The authentication data to be used with authenticating encryption algorithms (ignored for non-authenticating algorithms)- Returns:
- A
ICryptoTransformimplementation - Throws:
InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidAlgorithmParameterException
-
CreateEncryptor
public abstract ICryptoTransform CreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData, Provider provider) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException
Creates aICryptoTransformimplementation for encryption using the supplied initialization vector and the specific provider for the Java Security API.- Parameters:
key- The key material to be used.iv- The initialization vector to be used.authenticationData- The authentication data to be used with authenticating encryption algorithms (ignored for non-authenticating algorithms)provider- The provider to use.- Returns:
- A
ICryptoTransformimplementation - Throws:
InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidAlgorithmParameterException
-
CreateDecryptor
public abstract ICryptoTransform CreateDecryptor(byte[] key, byte[] iv, byte[] authenticationData, byte[] authenticationTag) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException
Creates aICryptoTransformimplementation for decryption using the supplied initialization vector and the specific provider for the Java Security API.- Parameters:
key- The key material to be used.iv- The initialization vector to be used.authenticationData- The authentication data to be used with authenticating encryption algorithms (ignored for non-authenticating algorithms)authenticationTag- The authentication tag to verify when using authenticating encryption algorithms (ignored for non-authenticating algorithms)- Returns:
- A
ICryptoTransformimplementation - Throws:
InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidAlgorithmParameterException
-
CreateDecryptor
public abstract ICryptoTransform CreateDecryptor(byte[] key, byte[] iv, byte[] authenticationData, byte[] authenticationTag, Provider provider) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException
Creates aICryptoTransformimplementation for decryption using the supplied initialization vector and the specific provider for the Java Security API.- Parameters:
key- The key material to be used.iv- The initialization vector to be used.authenticationData- The authentication data to be used with authenticating encryption algorithms (ignored for non-authenticating algorithms)authenticationTag- The authentication tag to verify when using authenticating encryption algorithms (ignored for non-authenticating algorithms)provider- The provider to use.- Returns:
- A
ICryptoTransformimplementation - Throws:
InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidAlgorithmParameterException
-
-