注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 图文细谈远程桌面之3389
 帮助

sha1加密(C# VS2005)


2008-01-25 15:26:05
 标签:sha1 加密 C# VS2005   [推送到技术圈]

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://approlife.blog.51cto.com/304821/60705
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);

本文出自 “技术旅途上蹒跚的步行者” 博客,请务必保留此出处http://approlife.blog.51cto.com/304821/60705



上一篇 C#调用PHP写的WebService  下一篇 每日一句



    文章评论
 
 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: