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 =
formsAuthenticationCredentials.PasswordFormat;
// Set the PasswordFormat property value.
formsAuthenticationCredentials.PasswordFormat =
FormsAuthPasswordFormat.SHA1;
Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.