MembershipProvider.EncryptPassword Method (Byte(), MembershipPasswordCompatibilityMode)
.NET Framework (current version)
Encrypts the specified password using the specified password-compatibility mode.
Assembly: System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)
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. |
.NET Framework
Available since 4.0
Available since 4.0
Show: