sha1加密(C# VS2005)(转自:http://yardan.blog.51cto.com/304821/60705)

来源:互联网 发布:个性定制软件 编辑:程序博客网 时间:2024/03/28 16:59
using System.Security.Cryptography;string str = "20070111";             SHA1 sha1 = new SHA1CryptoServiceProvider();             byte[] bytes_sha1_in = UTF8Encoding.Default.GetBytes(str);             byte[] bytes_sha1_out = sha1.ComputeHash(bytes_sha1_in);             string str_sha1_out = BitConverter.ToString(bytes_sha1_out);             MessageBox.Show(str_sha1_out);

原创粉丝点击