摘要: 加密字符串,没有什么说的,说明都在代码里面。看代码吧~ //定义SHA1对象 System.Security.Cryptography.SHA1 sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider(); //获取加密后密文字节数组 //注意编码UTF8、UTF7、Unicode等的选择,例如 //byte[] bytResult = sha1.ComputeHash(System.Text.Encoding.UTF8.GetBytes(strName)); //这里编码采用系统默认编码 byte[] bytResult = sha1.ComputeHash(System.Text.Encoding.Default.GetBytes(strName)); //转换成字符串 s 阅读全文
posted @ 2008-07-23 10:39 KenBlove 阅读(645) 评论(0) 推荐(0) 编辑