|
|
@ -4,6 +4,7 @@ using System.Data; |
|
|
|
using System.Data.SqlClient; |
|
|
|
using System.Linq; |
|
|
|
using System.Reflection; |
|
|
|
using System.Security.Cryptography; |
|
|
|
using System.Text; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
|
|
|
@ -114,5 +115,20 @@ namespace SqlSugar |
|
|
|
return Convert.ToInt64(string.Join("", bytes).PadRight(20, '0')); |
|
|
|
} |
|
|
|
|
|
|
|
internal static string GetMD5(string myString) |
|
|
|
{ |
|
|
|
MD5 md5 = new MD5CryptoServiceProvider(); |
|
|
|
byte[] fromData = System.Text.Encoding.Unicode.GetBytes(myString); |
|
|
|
byte[] targetData = md5.ComputeHash(fromData); |
|
|
|
string byte2String = null; |
|
|
|
|
|
|
|
for (int i = 0; i < targetData.Length; i++) |
|
|
|
{ |
|
|
|
byte2String += targetData[i].ToString("x"); |
|
|
|
} |
|
|
|
|
|
|
|
return byte2String; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|