CryptographicEngine.SignAsync(CryptographicKey, IBuffer) Method

Definition

Computes a hash for the supplied input data, and then signs the computed hash using the specified key.

public:
 static IAsyncOperation<IBuffer ^> ^ SignAsync(CryptographicKey ^ key, IBuffer ^ data);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IBuffer> SignAsync(CryptographicKey const& key, IBuffer const& data);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IBuffer> SignAsync(CryptographicKey key, IBuffer data);
function signAsync(key, data)
Public Shared Function SignAsync (key As CryptographicKey, data As IBuffer) As IAsyncOperation(Of IBuffer)

Parameters

key
CryptographicKey

The key to use to compute and sign the hash.

data
IBuffer

The raw input data to sign. The data is not hashed.

Returns

An asynchronous operation to retrieve the hashed and signed data.

Attributes

Remarks

The input data supplied to the SignAsync method is raw data that has not been hashed. To sign hashed data, use the SignHashedDataAsync method.

If the key is a persisted key and the operation requires UI or takes a long time, use the SignAsync method instead of the Sign method.

Applies to