Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-----------------------------------------------------------------------------------
- //получение мд5 кириллица корректно //|
- public static byte[] GetHash(string inputString) //|
- { //|
- HashAlgorithm algorithm = MD5.Create(); //or use SHA256.Create(); //|
- return algorithm.ComputeHash(Encoding.UTF8.GetBytes(inputString)); //|
- } //|
- public static string GetHashString(string inputString) //|
- { //|
- StringBuilder sb = new StringBuilder(); //|
- foreach (byte b in GetHash(inputString)) //|
- sb.Append(b.ToString("X2")); //|
- return sb.ToString().ToLower(); //|
- } //|
- //-----------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement