/// <summary> /// 验证密码 /// </summary> /// <param name="id"></param> /// <param name="salt"></param> /// <param name="pwd"></param> /// <param name="pwd2"></param> /// <returns></returns> public static bool VerifyPassword(int id, string salt, string pwd, string pwd2) { string p = MakeCommon.MakeMD5(salt + id + pwd2 + id + salt); string enc_pwd = ConcealCommon.EncryptDES(salt + p + salt); return(enc_pwd == pwd); }
/// <summary> /// 加密服务器密码 /// </summary> /// <param name="id"></param> /// <param name="password"></param> /// <param name="salt"></param> /// <returns></returns> public static string EncServerPassword(int id, string password, string salt) { return(MakeCommon.MakeMD5(salt + MakeCommon.MakeMD5(id + password + salt) + salt)); }