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)

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 = null);
static member DecryptAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.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

Task<KeyOperationResult>

The decryption result

Applies to

Product Introduced

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

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 = null);
static member DecryptAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * string * string * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.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

Task<KeyOperationResult>

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.

Applies to

Product Introduced