Share via


DataProtectionProvider.Create Method

Definition

Overloads

Create(DirectoryInfo)

Creates an DataProtectionProvider given a location at which to store keys.

Create(String)

Creates a DataProtectionProvider that store keys in a location based on the platform and operating system.

Create(DirectoryInfo, Action<IDataProtectionBuilder>)

Creates an DataProtectionProvider given a location at which to store keys and an optional configuration callback.

Create(DirectoryInfo, X509Certificate2)

Creates an DataProtectionProvider given a location at which to store keys and a X509Certificate2 used to encrypt the keys.

Create(String, X509Certificate2)

Creates a DataProtectionProvider that store keys in a location based on the platform and operating system and uses the given X509Certificate2 to encrypt the keys.

Create(DirectoryInfo, Action<IDataProtectionBuilder>, X509Certificate2)

Creates an DataProtectionProvider given a location at which to store keys, an optional configuration callback and a X509Certificate2 used to encrypt the keys.

Create(DirectoryInfo)

Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs

Creates an DataProtectionProvider given a location at which to store keys.

public:
 static Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ Create(System::IO::DirectoryInfo ^ keyDirectory);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create (System.IO.DirectoryInfo keyDirectory);
static member Create : System.IO.DirectoryInfo -> Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
Public Shared Function Create (keyDirectory As DirectoryInfo) As IDataProtectionProvider

Parameters

keyDirectory
DirectoryInfo

The DirectoryInfo in which keys should be stored. This may represent a directory on a local disk or a UNC share.

Returns

Applies to

Create(String)

Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs

Creates a DataProtectionProvider that store keys in a location based on the platform and operating system.

public:
 static Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ Create(System::String ^ applicationName);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create (string applicationName);
static member Create : string -> Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
Public Shared Function Create (applicationName As String) As IDataProtectionProvider

Parameters

applicationName
String

An identifier that uniquely discriminates this application from all other applications on the machine.

Returns

Applies to

Create(DirectoryInfo, Action<IDataProtectionBuilder>)

Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs

Creates an DataProtectionProvider given a location at which to store keys and an optional configuration callback.

public:
 static Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ Create(System::IO::DirectoryInfo ^ keyDirectory, Action<Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^> ^ setupAction);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create (System.IO.DirectoryInfo keyDirectory, Action<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder> setupAction);
static member Create : System.IO.DirectoryInfo * Action<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder> -> Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
Public Shared Function Create (keyDirectory As DirectoryInfo, setupAction As Action(Of IDataProtectionBuilder)) As IDataProtectionProvider

Parameters

keyDirectory
DirectoryInfo

The DirectoryInfo in which keys should be stored. This may represent a directory on a local disk or a UNC share.

setupAction
Action<IDataProtectionBuilder>

An optional callback which provides further configuration of the data protection system. See IDataProtectionBuilder for more information.

Returns

Applies to

Create(DirectoryInfo, X509Certificate2)

Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs

Creates an DataProtectionProvider given a location at which to store keys and a X509Certificate2 used to encrypt the keys.

public:
 static Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ Create(System::IO::DirectoryInfo ^ keyDirectory, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create (System.IO.DirectoryInfo keyDirectory, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
static member Create : System.IO.DirectoryInfo * System.Security.Cryptography.X509Certificates.X509Certificate2 -> Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
Public Shared Function Create (keyDirectory As DirectoryInfo, certificate As X509Certificate2) As IDataProtectionProvider

Parameters

keyDirectory
DirectoryInfo

The DirectoryInfo in which keys should be stored. This may represent a directory on a local disk or a UNC share.

certificate
X509Certificate2

The X509Certificate2 to be used for encryption.

Returns

Applies to

Create(String, X509Certificate2)

Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs

Creates a DataProtectionProvider that store keys in a location based on the platform and operating system and uses the given X509Certificate2 to encrypt the keys.

public:
 static Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ Create(System::String ^ applicationName, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create (string applicationName, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
static member Create : string * System.Security.Cryptography.X509Certificates.X509Certificate2 -> Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
Public Shared Function Create (applicationName As String, certificate As X509Certificate2) As IDataProtectionProvider

Parameters

applicationName
String

An identifier that uniquely discriminates this application from all other applications on the machine.

certificate
X509Certificate2

The X509Certificate2 to be used for encryption.

Returns

Applies to

Create(DirectoryInfo, Action<IDataProtectionBuilder>, X509Certificate2)

Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs
Source:
DataProtectionProvider.cs

Creates an DataProtectionProvider given a location at which to store keys, an optional configuration callback and a X509Certificate2 used to encrypt the keys.

public:
 static Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ Create(System::IO::DirectoryInfo ^ keyDirectory, Action<Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^> ^ setupAction, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create (System.IO.DirectoryInfo keyDirectory, Action<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder> setupAction, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
static member Create : System.IO.DirectoryInfo * Action<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder> * System.Security.Cryptography.X509Certificates.X509Certificate2 -> Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
Public Shared Function Create (keyDirectory As DirectoryInfo, setupAction As Action(Of IDataProtectionBuilder), certificate As X509Certificate2) As IDataProtectionProvider

Parameters

keyDirectory
DirectoryInfo

The DirectoryInfo in which keys should be stored. This may represent a directory on a local disk or a UNC share.

setupAction
Action<IDataProtectionBuilder>

An optional callback which provides further configuration of the data protection system. See IDataProtectionBuilder for more information.

certificate
X509Certificate2

The X509Certificate2 to be used for encryption.

Returns

Applies to