start padding out history pages. update plugin extension points to use PluginDetails object to identify themselves. implemented last scanned id methods to get last id from real ir daemon code to show on Race Director Page
31 lines
803 B
C#
31 lines
803 B
C#
using System.Security.Cryptography;
|
|
using System.Text;
|
|
|
|
namespace Helpers.Encryption
|
|
{
|
|
public class Hash
|
|
{
|
|
public static string HashString(string stringToHash)
|
|
{
|
|
//var shaEngine = new SHA3.SHA3Managed(512);
|
|
//var hash = shaEngine.ComputeHash(Encoding.Unicode.GetBytes(stringToHash));
|
|
//return Encoding.Unicode.GetString(hash);
|
|
|
|
MD5 md5 = MD5.Create();
|
|
|
|
byte[] inputBytes = Encoding.ASCII.GetBytes(stringToHash);
|
|
|
|
byte[] hash = md5.ComputeHash(inputBytes);
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
for (int i = 0; i < hash.Length; i++)
|
|
{
|
|
sb.Append(hash[i].ToString("X2"));
|
|
}
|
|
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
}
|