MD5加密字符串(32位大写)

/// <summary>
        /// MD5加密字符串(32位大写)
        /// </summary>
        /// <param name="source">源字符串</param>
        /// <returns>加密后的字符串</returns>
        public static string MD5(string source)
        {
            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            byte[] bytes = Encoding.UTF8.GetBytes(source);
            string result = BitConverter.ToString(md5.ComputeHash(bytes));
            return result.Replace("-", "");
        }

  

posted @ 2019-09-17 13:37  阿拉木木  阅读(7750)  评论(0编辑  收藏  举报