• File IO

    From Neo@VERT/MATRIX to All on Tue Apr 24 08:59:00 2001
    Okay, I want to start a project... but the first hurdle will be a username password system. I originally thought an INI type file would be best for this, but INI format does not exist...

    The question I want to know....

    If I create a file with username, and passwords, will I have to read in each value pair until a positive match comes up? Or is there an easier way to go about username password systems in Baja?

    Neo

    ---
    þ Synchronet þ The Matrix BBS : the-matrix.darktech.org
  • From Amcleod@VERT to Neo on Tue Apr 24 19:36:00 2001
    RE: File IO
    BY: Neo to All on Tue Apr 24 2001 07:59 pm

    If I create a file with username, and passwords, will I have to read in each value pair until a positive match comes up? Or is there an easier way to go about username password systems in Baja?

    It can be as complex as you like, as efficient as you want. You just have to program it how you want it.

    Unless you expect to have a large (IOW thousands) of users, a linear search is probably quite adequate. Otherwise, I'd keep the list ordered and do a logarithmic search. Fixed-length records, of course.

    But what are you doing username/password for? You can determine who the user is directly from the drop-file. (I assume there will be a drop-file; you didn't actually say so but I take it you're doing a door of some sort.) If you use the drop-file aproach, you will have the username and rely on the BBS login/logon security to verify identity. You can then use the BBS username to do a lookup of the "door name" if it is to be different. (Again, linear or logarithmic search would be my recommendation.)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net