You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
672 B
C#

using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using Txgy.EWS.Server.ICommon;
namespace Txgy.EWS.Server.Common
{
public class Utils : IUtils
{
public string GetMD5Str(string inputStr)
{
if (string.IsNullOrEmpty(inputStr)) return "";
byte[] result = Encoding.Default.GetBytes(inputStr); //tbPass为输入密码的文本框
MD5 md5 = new MD5CryptoServiceProvider();
byte[] output = md5.ComputeHash(result);
return BitConverter.ToString(output).Replace("-", ""); //tbMd5pass为输出加密文本的文本框
}
}
}