?? md5.cs
字號:
?using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace ZYBEncrypt
{
/// <summary>
/// MD5
/// </summary>
public class MD5_
{
public MD5_()
{
}
public string Encrypt(string Source)
{
byte[] data = UTF8Encoding.UTF8.GetBytes(Source);
// This is one implementation of the abstract class MD5.
MD5 md5 = new MD5CryptoServiceProvider();
byte[] result = md5.ComputeHash(data);
return Convert.ToBase64String(result);
}
public byte[] Encrypt(byte[] Source)
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] result = md5.ComputeHash(Source);
return result;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -