CryptographicEngine.SignHashedData(CryptographicKey, IBuffer) 方法

定義

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

public:
 static IBuffer ^ SignHashedData(CryptographicKey ^ key, IBuffer ^ data);
 static IBuffer SignHashedData(CryptographicKey const& key, IBuffer const& data);
public static IBuffer SignHashedData(CryptographicKey key, IBuffer data);
function signHashedData(key, data)
Public Shared Function SignHashedData (key As CryptographicKey, data As IBuffer) As IBuffer

參數

key
CryptographicKey

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

data
IBuffer

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

傳回

已簽署的資料。

備註

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

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

適用於