baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
Executable
+29
@@ -0,0 +1,29 @@
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.WebApi
|
||||
{
|
||||
public static class MD5Help
|
||||
{
|
||||
//这样容易解的密码变的更难解=无解
|
||||
const string MD5Key = "r16TD&*~12{]?[+3";
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
/// <returns></returns>
|
||||
public static string MD5Encrypt(string source, string hStrText = MD5Key)
|
||||
{
|
||||
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
|
||||
byte[] buffer = md5.ComputeHash(Encoding.UTF8.GetBytes(source));
|
||||
string strMD5Value = string.Empty;
|
||||
for (int i = 0; i < buffer.Length; i++)
|
||||
{
|
||||
int a = 0xf & buffer[i] >> 4;
|
||||
int b = buffer[i] & 0xf;
|
||||
strMD5Value += hStrText.Substring(a, 1) + hStrText[b];//0xf & buffer[i] >> 4 buffer[i] & 0xf
|
||||
}
|
||||
return strMD5Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user