This documentation is archived and is not being maintained.
MembershipProvider.EncryptPassword Method (Byte(), MembershipPasswordCompatibilityMode)
Visual Studio 2010
Encrypts the specified password using the specified password-compatibility mode.
Assembly: System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)
'Declaration Protected Overridable Function EncryptPassword ( _ password As Byte(), _ legacyPasswordCompatibilityMode As MembershipPasswordCompatibilityMode _ ) As Byte()
Parameters
- password
- Type: System.Byte()
A byte array that contains the password to encrypt.
- legacyPasswordCompatibilityMode
- Type: System.Web.Configuration.MembershipPasswordCompatibilityMode
The membership password-compatibility mode.
| Exception | Condition |
|---|---|
| ProviderException | The ValidationKey property or DecryptionKey property is set to AutoGenerate. |
| PlatformNotSupportedException | This method is not available. This can occur if the application targets the .NET Framework 4 Client Profile. To prevent this exception, override the method, or change the application to target the full version of the .NET Framework. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: