SecureStringExtensionsEncryptPassword Method

Encrypts an instance of to a DPAPI-protected string.

Definition

Namespace: ADCS.CertMod.Managed.Extensions
Assembly: ADCS.CertMod.Managed (in ADCS.CertMod.Managed.dll) Version: 1.2.0.0 (1.2.0.0)
C#
public static string EncryptPassword(
	this SecureString password
)

Parameters

password  SecureString
An instance of .

Return Value

String
DPAPI-protected string.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SecureString. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This method uses current user context for DPAPI.

See Also