SHA1加密C#

   //SHA1

        static public string SHA1_Hash(string str_sha1_in)
        {

            SHA1 sha1 = new SHA1CryptoServiceProvider();

            byte[] bytes_sha1_in = UTF8Encoding.Default.GetBytes(str_sha1_in);

            byte[] bytes_sha1_out = sha1.ComputeHash(bytes_sha1_in);

            string str_sha1_out = BitConverter.ToString(bytes_sha1_out);

            //str_sha1_out = str_sha1_out.Replace("-", "");

            return str_sha1_out;

        }

 

SHA1加密C#

上一篇:C# 读取IE缓存文件(2)


下一篇:uva--10066The Twin Towers +dp