C#中用MD5实现数据加密
using System.Security.Cryptography;
using System.Text;
private void button1_Click(object sender, System.EventArgs e)
{
byte[] bt=UTF8Encoding.UTF8.GetBytes(textBox1.Text );//UTF8需要对Text的引用
MD5CryptoServiceProvider objMD5;
objMD5=new MD5CryptoServiceProvider ();
byte[] output=objMD5.ComputeHash (bt);
textBox2.Text =BitConverter.ToString (output);
}
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/