共用方式為


DataProtectionBuilderExtensions.ProtectKeysWithDpapi 方法

定義

多載

ProtectKeysWithDpapi(IDataProtectionBuilder)

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

ProtectKeysWithDpapi(IDataProtectionBuilder, Boolean)

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

ProtectKeysWithDpapi(IDataProtectionBuilder)

來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
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 參考。

備註

只有 Windows 平臺才支援此 API。

適用於

ProtectKeysWithDpapi(IDataProtectionBuilder, Boolean)

來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
DataProtectionBuilderExtensions.cs
來源:
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 參考。

備註

只有 Windows 平臺才支援此 API。

適用於