DataProtectionBuilderExtensions.ProtectKeysWithCertificate 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
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)
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
- builder
- IDataProtectionBuilder
- 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)
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
- builder
- IDataProtectionBuilder
- thumbprint
- String
The thumbprint of the certificate to use when encrypting keys.
Returns
A reference to the IDataProtectionBuilder after this operation has completed.