Share via


CryptographyClient.SignData Method

Definition

Overloads

SignData(SignatureAlgorithm, Byte[], CancellationToken)

Signs the specified data.

SignData(SignatureAlgorithm, Stream, CancellationToken)

Signs the specified data.

SignData(SignatureAlgorithm, Byte[], CancellationToken)

Source:
CryptographyClient.cs
Source:
CryptographyClient.cs

Signs the specified data.

public virtual Azure.Security.KeyVault.Keys.Cryptography.SignResult SignData (Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm algorithm, byte[] data, System.Threading.CancellationToken cancellationToken = default);
abstract member SignData : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * byte[] * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.SignResult
override this.SignData : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * byte[] * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.SignResult
Public Overridable Function SignData (algorithm As SignatureAlgorithm, data As Byte(), Optional cancellationToken As CancellationToken = Nothing) As SignResult

Parameters

algorithm
SignatureAlgorithm

The SignatureAlgorithm to use.

data
Byte[]

The data to sign.

cancellationToken
CancellationToken

A CancellationToken to cancel the operation.

Returns

The result of the sign operation. The returned SignResult contains the signature along with all other information needed to verify it. This information should be stored with the signature.

Exceptions

The specified algorithm does not match the key corresponding to the key identifier.

The local cryptographic provider threw an exception.

The key is invalid for the current operation.

The operation is not supported with the specified key.

The server returned an error. See Message for details returned from the server.

Remarks

The hash algorithm used to compute the digest is derived from the specified algorithm:

Applies to

SignData(SignatureAlgorithm, Stream, CancellationToken)

Source:
CryptographyClient.cs
Source:
CryptographyClient.cs

Signs the specified data.

public virtual Azure.Security.KeyVault.Keys.Cryptography.SignResult SignData (Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm algorithm, System.IO.Stream data, System.Threading.CancellationToken cancellationToken = default);
abstract member SignData : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * System.IO.Stream * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.SignResult
override this.SignData : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * System.IO.Stream * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.SignResult
Public Overridable Function SignData (algorithm As SignatureAlgorithm, data As Stream, Optional cancellationToken As CancellationToken = Nothing) As SignResult

Parameters

algorithm
SignatureAlgorithm

The SignatureAlgorithm to use.

data
Stream

The data to sign.

cancellationToken
CancellationToken

A CancellationToken to cancel the operation.

Returns

The result of the sign operation. The returned SignResult contains the signature along with all other information needed to verify it. This information should be stored with the signature.

Exceptions

The specified algorithm does not match the key corresponding to the key identifier.

data is null.

The local cryptographic provider threw an exception.

The key is invalid for the current operation.

The operation is not supported with the specified key.

The server returned an error. See Message for details returned from the server.

Remarks

The hash algorithm used to compute the digest is derived from the specified algorithm:

Applies to