DataProtectionBuilderExtensions.ProtectKeysWithDpapiNG 方法

定义

重载

ProtectKeysWithDpapiNG(IDataProtectionBuilder, String, DpapiNGProtectionDescriptorFlags)

将密钥配置为在保存到存储之前使用 Windows CNG DPAPI 进行加密。

ProtectKeysWithDpapiNG(IDataProtectionBuilder)

将密钥配置为在保存到存储之前使用 Windows CNG DPAPI 进行加密。 密钥将由当前 Windows 用户帐户解密。

ProtectKeysWithDpapiNG(IDataProtectionBuilder, String, DpapiNGProtectionDescriptorFlags)

Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
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 。 此 API 仅在 Windows 8/Windows Server 2012 及更高版本上受支持。

适用于

ProtectKeysWithDpapiNG(IDataProtectionBuilder)

Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
Source:
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 。 此 API 仅在 Windows 8/Windows Server 2012 及更高版本上受支持。

适用于