Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

DataProtectionBuilderExtensions.ProtectKeysWithCertificate Method

Definition

Namespace:
Microsoft.AspNetCore.DataProtection
Assembly:
Microsoft.AspNetCore.DataProtection.dll
Package:
Microsoft.AspNetCore.DataProtection v10.0.0
Package:
Microsoft.AspNetCore.DataProtection v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.DataProtection v2.0.0
Package:
Microsoft.AspNetCore.DataProtection v2.1.0
Package:
Microsoft.AspNetCore.DataProtection v2.2.0
Package:
Microsoft.AspNetCore.DataProtection v3.0.3
Package:
Microsoft.AspNetCore.DataProtection v3.1.18
Package:
Microsoft.AspNetCore.DataProtection v5.0.9
Package:
Microsoft.AspNetCore.DataProtection v6.0.6
Package:
Microsoft.AspNetCore.DataProtection v7.0.5
Package:
Microsoft.AspNetCore.DataProtection v8.0.19
Package:
Microsoft.AspNetCore.DataProtection v9.0.8

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

Name Description
ProtectKeysWithCertificate(IDataProtectionBuilder, X509Certificate2)

Configures keys to be encrypted to a given certificate before being persisted to storage.

ProtectKeysWithCertificate(IDataProtectionBuilder, String)

Configures keys to be encrypted to a given certificate before being persisted to storage.

ProtectKeysWithCertificate(IDataProtectionBuilder, X509Certificate2)

Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
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 to a given certificate before being persisted to storage.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ ProtectKeysWithCertificate(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithCertificate(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
static member ProtectKeysWithCertificate : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder * System.Security.Cryptography.X509Certificates.X509Certificate2 -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function ProtectKeysWithCertificate (builder As IDataProtectionBuilder, certificate As X509Certificate2) As IDataProtectionBuilder

Parameters

certificate
X509Certificate2

The certificate to use when encrypting keys.

Returns

A reference to the IDataProtectionBuilder after this operation has completed.

Applies to

ProtectKeysWithCertificate(IDataProtectionBuilder, String)

Source:
DataProtectionBuilderExtensions.cs
Source:
DataProtectionBuilderExtensions.cs
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 to a given certificate before being persisted to storage.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ ProtectKeysWithCertificate(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder, System::String ^ thumbprint);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithCertificate(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string thumbprint);
static member ProtectKeysWithCertificate : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder * string -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function ProtectKeysWithCertificate (builder As IDataProtectionBuilder, thumbprint As String) As IDataProtectionBuilder

Parameters

thumbprint
String

The thumbprint of the certificate to use when encrypting keys.

Returns

A reference to the IDataProtectionBuilder after this operation has completed.

Applies to


Feedback

Was this page helpful?