Add project files.
This commit is contained in:
14
Utility/HashUtility.cs
Normal file
14
Utility/HashUtility.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace ConnectionsAPI.Utility
|
||||
{
|
||||
public static class HashUtility
|
||||
{
|
||||
public static string CalculateMD5(string input)
|
||||
{
|
||||
byte[] hash = MD5.HashData(Encoding.UTF8.GetBytes(input));
|
||||
return Convert.ToHexString(hash).Replace("-", string.Empty).ToLower();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user