共用方式為


DataProtectionBuilderExtensions.ProtectKeysWithDpapiNG 方法

定義

多載

ProtectKeysWithDpapiNG(IDataProtectionBuilder, String, DpapiNGProtectionDescriptorFlags)

將金鑰設定為使用 Windows CNG DPAPI 加密,再保存到儲存體。

ProtectKeysWithDpapiNG(IDataProtectionBuilder)

將金鑰設定為使用 Windows CNG DPAPI 加密,再保存到儲存體。 金鑰將由目前的 Windows 使用者帳戶解密。

ProtectKeysWithDpapiNG(IDataProtectionBuilder, String, DpapiNGProtectionDescriptorFlags)

來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs

將金鑰設定為使用 Windows CNG DPAPI 加密,再保存到儲存體。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ ProtectKeysWithDpapiNG(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder, System::String ^ protectionDescriptorRule, Microsoft::AspNetCore::DataProtection::XmlEncryption::DpapiNGProtectionDescriptorFlags flags);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapiNG (this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string protectionDescriptorRule, Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGProtectionDescriptorFlags flags);
static member ProtectKeysWithDpapiNG : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder * string * Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGProtectionDescriptorFlags -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function ProtectKeysWithDpapiNG (builder As IDataProtectionBuilder, protectionDescriptorRule As String, flags As DpapiNGProtectionDescriptorFlags) As IDataProtectionBuilder

參數

protectionDescriptorRule
String

用來保護金鑰內容的描述項規則字串。

flags
DpapiNGProtectionDescriptorFlags

應該傳遞給 'NCryptCreateProtectionDescriptor' 呼叫的旗標。 此參數的預設值為 None

傳回

此作業完成之後的 IDataProtectionBuilder 參考。

備註

如需 和 https://msdn.microsoft.com/en-us/library/windows/desktop/hh706800(v=vs.85).aspx 引數有效值 protectionDescriptorRule 的詳細資訊,請參閱 https://msdn.microsoft.com/en-us/library/windows/desktop/hh769091(v=vs.85).aspxflags 。 只有 Windows 8 / Windows Server 2012 和更新版本才支援此 API。

適用於

ProtectKeysWithDpapiNG(IDataProtectionBuilder)

來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs

將金鑰設定為使用 Windows CNG DPAPI 加密,再保存到儲存體。 金鑰將由目前的 Windows 使用者帳戶解密。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ ProtectKeysWithDpapiNG(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapiNG (this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder);
static member ProtectKeysWithDpapiNG : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function ProtectKeysWithDpapiNG (builder As IDataProtectionBuilder) As IDataProtectionBuilder

參數

傳回

此作業完成之後的 IDataProtectionBuilder 參考。

備註

如需 DPAPI-NG 的詳細資訊,請參閱 https://msdn.microsoft.com/en-us/library/windows/desktop/hh706794(v=vs.85).aspx 。 只有 Windows 8 / Windows Server 2012 和更新版本才支援此 API。

適用於