西安哪里有安利专卖店:asp.net(c#)中,md5加密代码

来源:百度文库 编辑:神马品牌网 时间:2024/05/06 11:45:01
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);