Condividi tramite


KeyVaultClient.SignWithHttpMessagesAsync Method

Definition

Creates a signature from a digest using the specified key.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyOperationResult>> SignWithHttpMessagesAsync (string vaultBaseUrl, string keyName, string keyVersion, string algorithm, byte[] value, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SignWithHttpMessagesAsync : string * string * string * string * byte[] * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyOperationResult>>
override this.SignWithHttpMessagesAsync : string * string * string * string * byte[] * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyOperationResult>>
Public Function SignWithHttpMessagesAsync (vaultBaseUrl As String, keyName As String, keyVersion As String, algorithm As String, value As Byte(), Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of KeyOperationResult))

Parameters

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

The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256'

value
Byte[]
customHeaders
Dictionary<String,List<String>>

Headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Implements

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Thrown when a required parameter is null

Remarks

The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault since this operation uses the private portion of the key. This operation requires the keys/sign permission.

Applies to