MembershipProvider.DecryptPassword(Byte[]) 方法
定义
解密已加密的密码。Decrypts an encrypted password.
protected:
virtual cli::array <System::Byte> ^ DecryptPassword(cli::array <System::Byte> ^ encodedPassword);
protected virtual byte[] DecryptPassword (byte[] encodedPassword);
abstract member DecryptPassword : byte[] -> byte[]
override this.DecryptPassword : byte[] -> byte[]
Protected Overridable Function DecryptPassword (encodedPassword As Byte()) As Byte()
参数
- encodedPassword
- Byte[]
一个字节数组,包含要解密的加密密码。A byte array that contains the encrypted password to decrypt.
返回
包含已解密密码的字节数组。A byte array that contains the decrypted password.
异常
将 ValidationKey 属性或 DecryptionKey 属性设置为 AutoGenerate
。The ValidationKey property or DecryptionKey property is set to AutoGenerate
.
此方法不可用。This method is not available. 如果应用程序以 .NET Framework 4 Client Profile.NET Framework 4 Client Profile 为目标,则会发生这种情况。This can occur if the application targets the .NET Framework 4 Client Profile.NET Framework 4 Client Profile. 若要避免此异常,请重写该方法,或将应用程序更改为面向 .NET Framework 的完整版本。To prevent this exception, override the method, or change the application to target the full version of the .NET Framework.
示例
有关MembershipProvider实现的示例,请参阅实现配置文件提供程序。For an example of a MembershipProvider implementation, see Implementing a Profile Provider.
注解
DecryptPassword方法是一个虚拟方法,为成员资格提供程序实现提供支持加密的密码格式时要使用的方法。The DecryptPassword method is a virtual method that is provided for membership provider implementations to use when supporting encrypted password formats.