Chinaunix首页 | 论坛 | 博客
  • 博客访问: 348187
  • 博文数量: 14
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 1081
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-25 16:58
文章分类

全部博文(14)

文章存档

2011年(1)

2009年(2)

2008年(11)

我的朋友

分类:

2008-09-11 11:39:24

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Security.Cryptography;
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
        ///
        /// 用md5加密
        ///

        /// 输入的数据
        ///
        public static string MD5(string Sourcein)
        {
            MD5CryptoServiceProvider MD5CSP = new MD5CryptoServiceProvider();
            byte[] MD5Source = System.Text.Encoding.UTF8.GetBytes(Sourcein);
            byte[] MD5Out = MD5CSP.ComputeHash(MD5Source);
            return Convert.ToBase64String(MD5Out);
        }
阅读(1176) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~