private string ResultCRC(Client client) { string crc = client.GetParam("OutSum") + ":" + client.GetParam("InvId") + ":" + "12311974b"; Console.WriteLine(crc); return(BaseFuncs.MD5(crc).ToUpper()); }
public string SetNewCookie(Client client) { string cookie = BaseFuncs.MD5(new Random().Next() + "CRT" + Environment.TickCount); //client.SetCookie.Add("Cart", cookie); client.SetCookie("Cart", new Cookie(cookie)); return(cookie); }
public bool Authorize(string Login, string Pswd, Client client) { Partner partner = this.GetByLogin(Login); if (partner != null && partner.Password == BaseFuncs.MD5(Pswd)) { partner.UserSession = this.GetRandomUserSession(); client.SetCookie("PartnerSession", new Cookie(partner.UserSession)); this.UpdateUserSession(partner.UserSession, partner.ID); return(true); } return(false); }
public Partner CreatePartner(Partner partner) { if (partner.Name.Length > 0 && partner.Login != null && partner.Password.Length > 0) { if (this.GetByLogin(partner.Login) == null) { partner.Password = BaseFuncs.MD5(partner.Password); return(this.GetByID(DBConnector.manager.InsertQueryReturn(partner))); } } return(null); }
public string SignatureValue(Order order) { string mrh_pass1 = "12311974a"; return(BaseFuncs.MD5(this.mrh_login + ":" + order.TotalCost.ToString() + ".00:" + order.ID + ":" + mrh_pass1)); }
private string GetRandomUserSession() { return(BaseFuncs.MD5(new Random().Next() + "prtnr" + Environment.TickCount)); }