共用方式為


IAuthenticatedEncryptorFactory.CreateEncryptorInstance(IKey) 方法

定義

IAuthenticatedEncryptor根據指定的 Descriptor 建立實例。

public:
 Microsoft::AspNetCore::DataProtection::AuthenticatedEncryption::IAuthenticatedEncryptor ^ CreateEncryptorInstance(Microsoft::AspNetCore::DataProtection::KeyManagement::IKey ^ key);
public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance (Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key);
public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor? CreateEncryptorInstance (Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key);
abstract member CreateEncryptorInstance : Microsoft.AspNetCore.DataProtection.KeyManagement.IKey -> Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor
Public Function CreateEncryptorInstance (key As IKey) As IAuthenticatedEncryptor

參數

key
IKey

傳回

IAuthenticatedEncryptor 執行個體。

備註

針對指定的 Descriptor ,這個方法所傳回的任何兩個實例都應該視為相等的,例如,其中一個 方法傳回的承載應該由另 Decrypt(ArraySegment<Byte>, ArraySegment<Byte>) 一個 Encrypt(ArraySegment<Byte>, ArraySegment<Byte>) 方法取用。

適用於