/// <summary> /// Saves the hash of a password /// </summary> /// <param name="pwd"></param> public void SetPassword(string pwd) { Password = DbHelpers.CreateMD5(Userid + pwd); LastPasswordModify = DateTime.Now; }
/// <summary> /// Checks a password against its saved hash /// </summary> /// <param name="pwd"></param> /// <returns></returns> public bool CheckPassword(string pwd) => Password == DbHelpers.CreateMD5(Userid + pwd);