2012年9月26日
摘要: using System;using System.Collections.Generic;using System.Text;using System.Security.Cryptography;namespace md5{ class Program { static void Main(string[] args) { Console.WriteLine(UserMd5("8")); Console.WriteLine(GetMd5Str("8")); } /**//// <summary> /// MD5 16位加密 /// < 阅读全文
posted @ 2012-09-26 15:08 洞幺人生 阅读(669) 评论(0) 推荐(0)
摘要: <connectionStrings> <add name="connstr" connectionString="Data Source=192.168.253.11;Initial Catalog=STRFID;User ID=sa;Password=unionsun;" providerName="System.Data.SqlClient"/> </connectionStrings> <appSettings> <add key="connstr" v 阅读全文
posted @ 2012-09-26 14:51 洞幺人生 阅读(253) 评论(0) 推荐(0)
摘要: C#:using System.Security;using System.Security.Cryptography;using System.Security.Authentication;static string UserMd5(string str) { string pwd = ""; MD5 md5 = MD5.Create();//实例化一个md5对像 // 加密后是一个字节类型的数组,这里要注意编码UTF8/Unicode等的选择 byte[] s = md5.ComputeHash(Encoding.UTF8.GetBytes(str)); // 通过使 阅读全文
posted @ 2012-09-26 14:48 洞幺人生 阅读(290) 评论(0) 推荐(0)