Class EncryptResult
java.lang.Object
com.azure.security.keyvault.keys.cryptography.models.EncryptResult
Represents the details of encrypt operation result.
-
Constructor Summary
ConstructorDescriptionEncryptResult
(byte[] ciphertext, EncryptionAlgorithm algorithm, String keyId) Creates the instance of Encrypt Result holding encryption operation response information.EncryptResult
(byte[] ciphertext, EncryptionAlgorithm algorithm, String keyId, byte[] iv, byte[] authenticationTag, byte[] additionalAuthenticatedData) Creates the instance of Encrypt Result holding encryption operation response information. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Get additional data to authenticate the encrypted content.Get the encryption algorithm used for encryption.byte[]
Get the tag to authenticate the encrypted content.byte[]
Get the encrypted content.byte[]
getIv()
Get the initialization vector used by symmetric algorithms.getKeyId()
Get the identifier of the key used to do encryption
-
Constructor Details
-
EncryptResult
Creates the instance of Encrypt Result holding encryption operation response information.- Parameters:
ciphertext
- The encrypted content.algorithm
- The algorithm used to encrypt the content.keyId
- The identifier of the key usd for the encryption operation.
-
EncryptResult
public EncryptResult(byte[] ciphertext, EncryptionAlgorithm algorithm, String keyId, byte[] iv, byte[] authenticationTag, byte[] additionalAuthenticatedData) Creates the instance of Encrypt Result holding encryption operation response information.- Parameters:
ciphertext
- The encrypted content.algorithm
- The algorithm used to encrypt the content.keyId
- The identifier of the key usd for the encryption operation.iv
- Initialization vector for symmetric algorithms.authenticationTag
- The tag to authenticate when performing decryption with an authenticated algorithm.additionalAuthenticatedData
- Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms.
-
-
Method Details
-
getKeyId
Get the identifier of the key used to do encryption- Returns:
- the key identifier
-
getCipherText
public byte[] getCipherText()Get the encrypted content.- Returns:
- The encrypted content.
-
getAlgorithm
Get the encryption algorithm used for encryption.- Returns:
- The encryption algorithm used.
-
getIv
public byte[] getIv()Get the initialization vector used by symmetric algorithms.- Returns:
- The initialization vector.
-
getAuthenticationTag
public byte[] getAuthenticationTag()Get the tag to authenticate the encrypted content.- Returns:
- The authentication tag.
-
getAdditionalAuthenticatedData
public byte[] getAdditionalAuthenticatedData()Get additional data to authenticate the encrypted content.- Returns:
- The additional authenticated data.
-