FormsAuthentication.HashPasswordForStoringInConfigFile(String, String) Method
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.
Caution
The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.
Produces a hash password suitable for storing in a configuration file based on the specified password and hash algorithm.
public:
static System::String ^ HashPasswordForStoringInConfigFile(System::String ^ password, System::String ^ passwordFormat);
public static string HashPasswordForStoringInConfigFile (string password, string passwordFormat);
[System.Obsolete("The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.")]
public static string HashPasswordForStoringInConfigFile (string password, string passwordFormat);
static member HashPasswordForStoringInConfigFile : string * string -> string
[<System.Obsolete("The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.")>]
static member HashPasswordForStoringInConfigFile : string * string -> string
Public Shared Function HashPasswordForStoringInConfigFile (password As String, passwordFormat As String) As String
Parameters
- password
- String
The password to hash.
- passwordFormat
- String
The hash algorithm to use. passwordFormat
is a String
that represents one of the FormsAuthPasswordFormat enumeration values.
Returns
The hashed password.
- Attributes
Exceptions
passwordFormat
is not a valid FormsAuthPasswordFormat value.
Remarks
This method is obsolete. Alternatively, you can use ASP.NET membership to store user credentials. For more information, see Managing Users by Using Membership.