CryptographicEngine.DecryptAsync(CryptographicKey, IBuffer, IBuffer) 方法

定義

使用提供的金鑰解密加密的輸入資料。

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

參數

key
CryptographicKey

用來解密加密輸入資料的金鑰。

data
IBuffer

要解密的加密資料。

iv
IBuffer

對稱金鑰的初始向量。 針對非對稱金鑰,請將此值設定為 null。

傳回

已解密的資料。

屬性

備註

如果金鑰是保存的金鑰,且解密作業需要 UI 或花費很長的時間,請使用 DecryptAsync 方法,而不是 Decrypt 方法。 例如,使用強式保護的金鑰解密時,需要 UI。

適用於