MD5加密登錄密碼效果
注:
博客主頁:
https://blog.csdn.net/badao_liumang_qizhi
關(guān)注公眾號(hào)
霸道的程序猿
獲取編程相關(guān)電子書、教程推送與免費(fèi)下載。
新建Winform程序并添加System.Web引用
然后新建一個(gè)登錄頁面,并設(shè)計(jì)登錄頁面布局如下
然后進(jìn)入其代碼修改為
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"); } }}
聯(lián)系客服