Export (0) Print
Expand All

DpapiDataProtector Constructor

.NET Framework 4.5

Creates a new instance of the DpapiDataProtector class by using the specified application name, primary purpose, and specific purposes.

Namespace:  System.Security.Cryptography
Assembly:  System.Security (in System.Security.dll)

'Declaration
Public Sub New ( _
	appName As String, _
	primaryPurpose As String, _
	ParamArray specificPurpose As String() _
)

Parameters

appName
Type: System.String

The name of the application.

primaryPurpose
Type: System.String

The primary purpose for the data protector.

specificPurpose
Type: System.String()

The specific purpose(s) for the data protector.

ExceptionCondition
ArgumentException

appName is an empty string or Nothing.

-or-

primaryPurpose is an empty string or Nothing.

-or-

specificPurposes contains an empty string or Nothing.

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>.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft