Skip to main content
CryptographicEngine.SignAsync | signAsync method

Applies to Windows and Windows Phone

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

Syntax


Windows.Security.Cryptography.Core.CryptographicEngine.signAsync(key, data).done( /* Your success and error handlers */ );

public static IAsyncOperation<IBuffer> SignAsync(
  CryptographicKey key, 
  IBuffer data
)

Public Shared Function SignAsync(
  key As CryptographicKey,  
  data As IBuffer 
) As IAsyncOperation(Of IBuffer)

public:
static IAsyncOperation<IBuffer>^ SignAsync(
  CryptographicKey^ key, 
  IBuffer^ data
)

Parameters

key

Type: CryptographicKey

The key to use to compute and sign the hash.

data

Type: IBuffer

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

Return value

Type: IAsyncOperation<IBuffer>

An asynchronous operation to retrieve the hashed and signed data.

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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Security.Cryptography.Core
Windows::Security::Cryptography::Core [C++]

Metadata

Windows.winmd

See also

CryptographicEngine