MD5 Hash

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);
            }
 
        }