/// <summary> /// 密码加密 /// </summary> public static byte[] EncryptPassword(string password) { UnicodeEncoding encoding = new UnicodeEncoding(); byte[] hashBytes = encoding.GetBytes( password ); SHA1 sha1 = new SHA1CryptoServiceProvider(); byte[] cryptPassword = sha1.ComputeHash ( hashBytes); return cryptPassword; }