using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;

namespace BusinessLayer
{
    public class Md5Convert
    {
        public static string GetMd5Str(string ConvertString)
        {
            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            string t2 = BitConverter.ToString(md5.ComputeHash(UTF8Encoding.Default.GetBytes(ConvertString)), 4, 8);
            t2 = t2.Replace("-", "");           
            return t2;
        }
    }
}

Posted on 2006-08-03 17:13  李通通  阅读(936)  评论(1编辑  收藏  举报