Share via


KeyVaultClientExtensions.DecryptAsync Method

Definition

Overloads

DecryptAsync(IKeyVaultClient, String, String, Byte[], CancellationToken)

Decrypts a single block of encrypted data

DecryptAsync(IKeyVaultClient, String, String, String, String, Byte[], CancellationToken)

Decrypts a single block of encrypted data.

DecryptAsync(IKeyVaultClient, String, String, Byte[], CancellationToken)

Source:
KeyVaultClientExtensions.cs

Decrypts a single block of encrypted data

public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyOperationResult> DecryptAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string keyIdentifier, string algorithm, byte[] cipherText, System.Threading.CancellationToken cancellationToken = default);
static member DecryptAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyOperationResult>
<Extension()>
Public Function DecryptAsync (operations As IKeyVaultClient, keyIdentifier As String, algorithm As String, cipherText As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyOperationResult)

Parameters

operations
IKeyVaultClient
keyIdentifier
String

The full key identifier

algorithm
String

The algorithm. For more information on possible algorithm types, see JsonWebKeyEncryptionAlgorithm.

cipherText
Byte[]

The cipher text

cancellationToken
CancellationToken

Optional cancellation token

Returns

The decryption result

Applies to

DecryptAsync(IKeyVaultClient, String, String, String, String, Byte[], CancellationToken)

Source:
KeyVaultClientExtensions.cs

Decrypts a single block of encrypted data.

public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyOperationResult> DecryptAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string vaultBaseUrl, string keyName, string keyVersion, string algorithm, byte[] value, System.Threading.CancellationToken cancellationToken = default);
static member DecryptAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * string * string * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyOperationResult>
<Extension()>
Public Function DecryptAsync (operations As IKeyVaultClient, vaultBaseUrl As String, keyName As String, keyVersion As String, algorithm As String, value As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyOperationResult)

Parameters

operations
IKeyVaultClient

The operations group for this extension method.

vaultBaseUrl
String

The vault name, for example https://myvault.vault.azure.net.

keyName
String

The name of the key.

keyVersion
String

The version of the key.

algorithm
String

algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5'

value
Byte[]
cancellationToken
CancellationToken

The cancellation token.

Returns

Remarks

The DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key and specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single block of data may be decrypted, the size of this block is dependent on the target key and the algorithm to be used. The DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key. This operation requires the keys/decrypt permission.

Applies to