DpapiDataProtector(String, String, String[]) Constructor
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.
Creates a new instance of the DpapiDataProtector class by using the specified application name, primary purpose, and specific purposes.
public:
DpapiDataProtector(System::String ^ appName, System::String ^ primaryPurpose, ... cli::array <System::String ^> ^ specificPurpose);
public DpapiDataProtector (string appName, string primaryPurpose, params string[] specificPurpose);
new System.Security.Cryptography.DpapiDataProtector : string * string * string[] -> System.Security.Cryptography.DpapiDataProtector
Public Sub New (appName As String, primaryPurpose As String, ParamArray specificPurpose As String())
Parameters
- appName
- String
The name of the application.
- primaryPurpose
- String
The primary purpose for the data protector.
- specificPurpose
- String[]
The specific purpose(s) for the data protector.
Exceptions
appName
is an empty string or null
.
-or-
primaryPurpose
is an empty string or null
.
-or-
specificPurposes
contains an empty string or null
.
Remarks
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>.