using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MP5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnOK_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txt.Text.Trim())) //文本宽不能为空
{
return;
}
string pwd= System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(txt.Text.Trim(), "MD5"); // 主要语句 , 写这句之前要引用system.web 程序集
MessageBox.Show(pwd);
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MP5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnOK_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txt.Text.Trim())) //文本宽不能为空
{
return;
}
string pwd= System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(txt.Text.Trim(), "MD5"); // 主要语句 , 写这句之前要引用system.web 程序集
MessageBox.Show(pwd);
}
}
}