场景MD5加密登录密码效果
注: 博客主页: 实现新建Winform程序并添加System.Web引用
然后新建一个登录页面,并设计登录页面布局如下
然后进入其代码修改为 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace MD5EnPWD { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void textBox2_TextChanged(object sender, EventArgs e) { textBox3.Text = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(textBox2.Text, "MD5"); } } }
|
|
来自: python_lover > 《待分类》