ge abb:asp.net(c#)中,md5加密代码

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/27 16:18:50
asp.net(c#)中,md5加密代码
还有用法

string strMd5 = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile("123", "md5");

strMd5 就是 123 经过 MD5 加密后的结果

[C#]
using System.Security.Cryptography;

byte[] data = new byte[DATA_SIZE];

// This is one implementation of the abstract class MD5.
MD5 md5 = new MD5CryptoServiceProvider();

byte[] result = md5.ComputeHash(data);