FormsAuthPasswordFormat Enumeration
Collapse the table of content
Expand the table of content

FormsAuthPasswordFormat Enumeration


Defines the encryption format for storing passwords.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public enum FormsAuthPasswordFormat

Member nameDescription

Specifies that passwords are not encrypted. This field is constant.


Specifies that passwords are encrypted using the MD5 hash algorithm. This field is constant.


Specifies that passwords are encrypted using the SHA1 hash algorithm. This field is constant.

To programmatically configure the type of encryption used to store passwords in a Web application, use the AuthenticationSection class. This class is also used internally by FormsAuthentication in the processing of authentication tickets.

The following code example shows how to use the FormsAuthPasswordFormat enumeration. Refer to the code example in the FormsAuthenticationUserCollection class topic to learn how to get the collection.

// Get the current PasswordFormat property value.
FormsAuthPasswordFormat currentPasswordFormat =

// Set the PasswordFormat property value.
formsAuthenticationCredentials.PasswordFormat = 

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft