Share via


KeyVaultClientExtensions.SignAsync Method

Definition

Overloads

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

Creates a signature from a digest using the specified key in the vault

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

Creates a signature from a digest using the specified key.

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

Source:
KeyVaultClientExtensions.cs

Creates a signature from a digest using the specified key in the vault

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

Parameters

operations
IKeyVaultClient
keyIdentifier
String

The global key identifier of the signing key

algorithm
String

The signing algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm.

digest
Byte[]

The digest value to sign

cancellationToken
CancellationToken

Optional cancellation token

Returns

The signature value

Applies to

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

Source:
KeyVaultClientExtensions.cs

Creates a signature from a digest using the specified key.

public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyOperationResult> SignAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string vaultBaseUrl, string keyName, string keyVersion, string algorithm, byte[] value, System.Threading.CancellationToken cancellationToken = default);
static member SignAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * string * string * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyOperationResult>
<Extension()>
Public Function SignAsync (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

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[]
cancellationToken
CancellationToken

The cancellation token.

Returns

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