????MD5?????(???????)
????????????System.Security.Cryptography ???????
/// <summary>
/// ?????MD5?????
/// </summary>
/// <param name="inputStr">??????????????????</param>
/// <param name="secString">??????????????????</param>
/// <returns>?????????????????(??д)??string????</returns>
public static string GetMd5Str(string inputStr?? string secString)
{
byte[] palinData = null;
byte[] encryptData = null;
try
{
MD5 md5 = new MD5CryptoServiceProvider();
palinData = Encoding.Default.GetBytes(inputStr + secString);
encryptData = md5.ComputeHash(palinData);
}
catch (Exception e)
{
throw e;
}
return Convert.ToBase64String(encryptData).Substring(0?? 20).ToUpper();
}