Produces a hash password suitable for storing in a configuration file based on the specified password and hash algorithm.
- password
- The password to hash.
- passwordFormat
- The hash algorithm to use. passwordFormat is a String that represents one of the System.Web.Configuration.FormsAuthPasswordFormat enumeration values.
The hashed password.
The FormsAuthentication.HashPasswordForStoringInConfigFile(string, string) method creates a hashed password value that can be used when storing forms-authentication credentials in the configuration file for an application.
Authentication credentials stored in the configuration file for an application are used by the FormsAuthentication.Authenticate(string, string) method to verify passwords for users of an application. Alternatively, you can use ASP.NET membership to store user credentials. For more information, see Managing Users Using ASP.NET Membership.