> public static byte[] EncryptPassword(string password)
> {
> UnicodeEncoding encoding = new UnicodeEncoding();
> byte[] hashBytes = encoding.GetBytes( password );
>
> // compute SHA-1 hash.
> SHA1 sha1 = new SHA1CryptoServiceProvider();
> byte[] cryptPassword = sha1.ComputeHash ( hashBytes );
>
> return cryptPassword;
> }
> {
> UnicodeEncoding encoding = new UnicodeEncoding();
> byte[] hashBytes = encoding.GetBytes( password );
>
> // compute SHA-1 hash.
> SHA1 sha1 = new SHA1CryptoServiceProvider();
> byte[] cryptPassword = sha1.ComputeHash ( hashBytes );
>
> return cryptPassword;
> }
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货