MD5加密
来源:互联网 发布:dbc2000数据库64位 编辑:程序博客网 时间:2024/05/23 02:01
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
namespace MD5Demo
{
class Program
{
static void Main(string[] args)
{
string str = "123";
//202cb962ac59075b964b07152d234b70
//202cb962ac59075b964b07152d234b70
Console.Write(UseMD5(str));
Console.ReadKey();
}
public static string UseMD5(string str)
{
MD5 md5 = MD5.Create();
byte[] buffer = Encoding.Default.GetBytes(str);
byte[] md5byte = md5.ComputeHash(buffer);
string strNew = "";
for (int i = 0; i < md5byte.Length; i++)
{
strNew += md5byte[i].ToString("x2");
}
return strNew;
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
namespace MD5Demo
{
class Program
{
static void Main(string[] args)
{
string str = "123";
//202cb962ac59075b964b07152d234b70
//202cb962ac59075b964b07152d234b70
Console.Write(UseMD5(str));
Console.ReadKey();
}
public static string UseMD5(string str)
{
MD5 md5 = MD5.Create();
byte[] buffer = Encoding.Default.GetBytes(str);
byte[] md5byte = md5.ComputeHash(buffer);
string strNew = "";
for (int i = 0; i < md5byte.Length; i++)
{
strNew += md5byte[i].ToString("x2");
}
return strNew;
}
}
}
0 0
- MD5加密
- MD5加密
- md5加密
- MD5加密
- md5加密
- MD5加密
- MD5加密
- md5 加密
- MD5加密
- md5加密
- MD5加密
- MD5加密
- MD5加密
- MD5加密
- MD5加密
- MD5加密
- MD5加密
- MD5加密
- 如何使网站可使用HTTPS访问
- HTTP Status 404 -(tomcat,springmvc,ModelAndView)
- 搭建Dynamic Web Project(动态web项目)的springmvc工程1
- hdu-1009 FatMouse' Trade(贪心算法)
- jps ps
- MD5加密
- 绘画
- leetcode Reverse Integer
- 每个男生都会不经意的成为浪漫的制造者。
- 安装与配置windbg的symbol(符号)
- C++对象模型之简述C++对象的内存布局
- poj2965 The Pilots Brothers' refrigerator
- 卡特兰数列
- 搭建Dynamic Web Project(动态web项目)的springmvc工程2