MD5 Hash
- Returns MD5 Hash as string.
using System.Security.Cryptography; ... /// <summary> /// Creates MD5 hash as a string. /// </summary> /// <param name="bytearray">Input array to be hashed.</param> /// <returns>Returns MD5 hash string</returns> public string GetMD5Hash(byte[] bytearray) { using (MD5 md5 = MD5.Create()) { byte[] byteHashed = md5.ComputeHash(bytearray); return Convert.ToBase64String(byteHashed); } }