DataProtector.Create(String, String, String, String[]) Method

Definition

Creates an instance of a data protector implementation by using the specified class name of the data protector, the application name, the primary purpose, and the specific purposes.

C#
public static System.Security.Cryptography.DataProtector Create(string providerClass, string applicationName, string primaryPurpose, params string[] specificPurposes);

Parameters

providerClass
String

The class name for the data protector.

applicationName
String

The name of the application.

primaryPurpose
String

The primary purpose for the protected data.

specificPurposes
String[]

The specific purposes for the protected data.

Returns

A data protector implementation object.

Exceptions

providerClass is null.

Applies to

Produkt Verzie
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1