DataProtectionBuilderExtensions.ProtectKeysWithDpapi Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ProtectKeysWithDpapi(IDataProtectionBuilder) |
Configures keys to be encrypted with Windows DPAPI before being persisted to storage. The encrypted key will only be decryptable by the current Windows user account. |
ProtectKeysWithDpapi(IDataProtectionBuilder, Boolean) |
Configures keys to be encrypted with Windows DPAPI before being persisted to storage. |
ProtectKeysWithDpapi(IDataProtectionBuilder)
Configures keys to be encrypted with Windows DPAPI before being persisted to storage. The encrypted key will only be decryptable by the current Windows user account.
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
Parameters
- builder
- IDataProtectionBuilder
Returns
A reference to the IDataProtectionBuilder after this operation has completed.
Remarks
This API is only supported on Windows platforms.
Applies to
ProtectKeysWithDpapi(IDataProtectionBuilder, Boolean)
Configures keys to be encrypted with Windows DPAPI before being persisted to storage.
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
Parameters
- builder
- IDataProtectionBuilder
- protectToLocalMachine
- Boolean
'true' if the key should be decryptable by any use on the local machine, 'false' if the key should only be decryptable by the current Windows user account.
Returns
A reference to the IDataProtectionBuilder after this operation has completed.
Remarks
This API is only supported on Windows platforms.