CryptographicEngine.SignHashedDataAsync(CryptographicKey, IBuffer) 方法

定義

使用指定的索引鍵簽署雜湊輸入資料。

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

參數

key
CryptographicKey

用來簽署雜湊的索引鍵。 此金鑰必須是從 PersistedKeyProviderAsymmetricKeyAlgorithmProvider取得的非對稱金鑰。

data
IBuffer

要簽署的輸入資料。 資料是可透過累加雜湊取得的雜湊值。

傳回

擷取已簽署資料的非同步作業。

屬性

備註

提供給 SignHashedDataAsync 方法的輸入資料是雜湊值。 若要簽署尚未雜湊的原始資料,請使用 SignAsync 方法。

如果金鑰是持續性金鑰,而且作業需要 UI 或花費很長的時間,請使用 SignHashedDataAsync 方法,而不是 SignHashedData 方法。

適用於