EncryptResult Class

  • java.lang.Object
    • com.azure.security.keyvault.keys.cryptography.models.EncryptResult

public final class EncryptResult

Represents the details of encrypt operation result.

Constructor Summary

Constructor Description
EncryptResult(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 Type Method and Description
byte[] getAdditionalAuthenticatedData()

Get additional data to authenticate the encrypted content.

EncryptionAlgorithm getAlgorithm()

Get the encryption algorithm used for encryption.

byte[] getAuthenticationTag()

Get the tag to authenticate the encrypted content.

byte[] getCipherText()

Get the encrypted content.

byte[] getIv()

Get the initialization vector used by symmetric algorithms.

String getKeyId()

Get the identifier of the key used to do encryption

Methods inherited from java.lang.Object

Constructor Details

EncryptResult

public EncryptResult(byte[] ciphertext, EncryptionAlgorithm algorithm, String keyId)

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

getAdditionalAuthenticatedData

public byte[] getAdditionalAuthenticatedData()

Get additional data to authenticate the encrypted content.

Returns:

The additional authenticated data.

getAlgorithm

public EncryptionAlgorithm getAlgorithm()

Get the encryption algorithm used for encryption.

Returns:

The encryption algorithm used.

getAuthenticationTag

public byte[] getAuthenticationTag()

Get the tag to authenticate the encrypted content.

Returns:

The authentication tag.

getCipherText

public byte[] getCipherText()

Get the encrypted content.

Returns:

The encrypted content.

getIv

public byte[] getIv()

Get the initialization vector used by symmetric algorithms.

Returns:

The initialization vector.

getKeyId

public String getKeyId()

Get the identifier of the key used to do encryption

Returns:

the key identifier

Applies to