DataProtectionCommonExtensions.CreateProtector DataProtectionCommonExtensions.CreateProtector DataProtectionCommonExtensions.CreateProtector Method

Definition

Overloads

CreateProtector(IDataProtectionProvider, IEnumerable<String>) CreateProtector(IDataProtectionProvider, IEnumerable<String>) CreateProtector(IDataProtectionProvider, IEnumerable<String>)

Creates an IDataProtector given a list of purposes.

CreateProtector(IDataProtectionProvider, String, String[]) CreateProtector(IDataProtectionProvider, String, String[]) CreateProtector(IDataProtectionProvider, String, String[])

Creates an IDataProtector given a list of purposes.

CreateProtector(IDataProtectionProvider, IEnumerable<String>) CreateProtector(IDataProtectionProvider, IEnumerable<String>) CreateProtector(IDataProtectionProvider, IEnumerable<String>)

Creates an IDataProtector given a list of purposes.

public static Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector (this Microsoft.AspNetCore.DataProtection.IDataProtectionProvider provider, System.Collections.Generic.IEnumerable<string> purposes);
static member CreateProtector : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider * seq<string> -> Microsoft.AspNetCore.DataProtection.IDataProtector
<Extension()>
Public Function CreateProtector (provider As IDataProtectionProvider, purposes As IEnumerable(Of String)) As IDataProtector

Parameters

purposes
IEnumerable<String>

The list of purposes which contribute to the purpose chain. This list must contain at least one element, and it may not contain null elements.

Returns

An IDataProtector tied to the provided purpose chain.

Remarks

This is a convenience method which chains together several calls to CreateProtector(String). See that method's documentation for more information.

CreateProtector(IDataProtectionProvider, String, String[]) CreateProtector(IDataProtectionProvider, String, String[]) CreateProtector(IDataProtectionProvider, String, String[])

Creates an IDataProtector given a list of purposes.

public static Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector (this Microsoft.AspNetCore.DataProtection.IDataProtectionProvider provider, string purpose, params string[] subPurposes);
static member CreateProtector : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider * string * string[] -> Microsoft.AspNetCore.DataProtection.IDataProtector
<Extension()>
Public Function CreateProtector (provider As IDataProtectionProvider, purpose As String, ParamArray subPurposes As String()) As IDataProtector

Parameters

purpose
String String String

The primary purpose used to create the IDataProtector.

subPurposes
String[]

An optional list of secondary purposes which contribute to the purpose chain. If this list is provided it cannot contain null elements.

Returns

An IDataProtector tied to the provided purpose chain.

Remarks

This is a convenience method which chains together several calls to CreateProtector(String). See that method's documentation for more information.

Applies to