Share via


DataProtectionBuilderExtensions.ProtectKeysWithDpapiNG Method

Definition

Overloads

ProtectKeysWithDpapiNG(IDataProtectionBuilder, String, DpapiNGProtectionDescriptorFlags)

Configures keys to be encrypted with Windows CNG DPAPI before being persisted to storage.

ProtectKeysWithDpapiNG(IDataProtectionBuilder)

Configures keys to be encrypted with Windows CNG DPAPI before being persisted to storage. The keys will be decryptable by the current Windows user account.

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

Configures keys to be encrypted with Windows CNG DPAPI before being persisted to storage.

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

Parameters

protectionDescriptorRule
String

The descriptor rule string with which to protect the key material.

flags
DpapiNGProtectionDescriptorFlags

Flags that should be passed to the call to 'NCryptCreateProtectionDescriptor'. The default value of this parameter is None.

Returns

A reference to the IDataProtectionBuilder after this operation has completed.

Remarks

See https://msdn.microsoft.com/en-us/library/windows/desktop/hh769091(v=vs.85).aspx and https://msdn.microsoft.com/en-us/library/windows/desktop/hh706800(v=vs.85).aspx for more information on valid values for the the protectionDescriptorRule and flags arguments. This API is only supported on Windows 8 / Windows Server 2012 and higher.

Applies to

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

Configures keys to be encrypted with Windows CNG DPAPI before being persisted to storage. The keys will be decryptable by the current Windows user account.

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

Parameters

Returns

A reference to the IDataProtectionBuilder after this operation has completed.

Remarks

See https://msdn.microsoft.com/en-us/library/windows/desktop/hh706794(v=vs.85).aspx for more information on DPAPI-NG. This API is only supported on Windows 8 / Windows Server 2012 and higher.

Applies to