DpapiDataProtector Constructor (String^, String^, array<String^>^)
Creates a new instance of the DpapiDataProtector class by using the specified application name, primary purpose, and specific purposes.
Assembly: System.Security (in System.Security.dll)
public: DpapiDataProtector( String^ appName, String^ primaryPurpose, ... array<String^>^ specificPurpose )
Parameters
- appName
-
Type:
System::String^
The name of the application.
- primaryPurpose
-
Type:
System::String^
The primary purpose for the data protector.
- specificPurpose
-
Type:
array<System::String^>^
The specific purpose(s) for the data protector.
| Exception | Condition |
|---|---|
| ArgumentException | appName is an empty string or null. -or- primaryPurpose is an empty string or null. -or- specificPurposes contains an empty string or null. |
The application name specified by the appName parameter is considered to be a part of the purpose for the protected data. The three parameters are hashed, and the hash is used for both protecting and unprotecting the data. Examples of primaryPurpose and specificPurposes values are Giftcard and <gift card number> or Invoice and <invoice number>.
for protecting data. Security action: Demand. Associated enumeration: Unrestricted.
Available since 4.5