DataProtectionBuilderExtensions.ProtectKeysWithDpapi 方法

定义

重载

ProtectKeysWithDpapi(IDataProtectionBuilder)

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

ProtectKeysWithDpapi(IDataProtectionBuilder, Boolean)

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

ProtectKeysWithDpapi(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 DPAPI 加密。 加密密钥只能由当前 Windows 用户帐户解密。

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

参数

返回

此操作完成后对 IDataProtectionBuilder 的引用。

注解

此 API 仅在 Windows 平台上受支持。

适用于

ProtectKeysWithDpapi(IDataProtectionBuilder, Boolean)

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 DPAPI 加密。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ ProtectKeysWithDpapi(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder, bool protectToLocalMachine);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapi (this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, bool protectToLocalMachine);
static member ProtectKeysWithDpapi : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder * bool -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function ProtectKeysWithDpapi (builder As IDataProtectionBuilder, protectToLocalMachine As Boolean) As IDataProtectionBuilder

参数

protectToLocalMachine
Boolean

如果密钥应可通过本地计算机上的任意用途解密,则为“true”;如果密钥只能由当前 Windows 用户帐户解密,则为“false”。

返回

此操作完成后对 IDataProtectionBuilder 的引用。

注解

此 API 仅在 Windows 平台上受支持。

适用于