The AuthLoad class is broken into 4 files:
authload.h : holds all of the class declarations
authload.cpp : holds all functions for AuthLoad::
auth_user.cpp : holds all function defs. for the nested class
auth_global.cpp: holds all function defs. for nested class
AuthLoad::Globals:: (currently does nothing)
auth_contact.cpp: holds all function defs. for nested class
When you first create an authload object, you can specify a directory in
the constructor. This is were authload will look for user configuration
files. The default constructor looks in the directory that the program
is ran from.
You may try to create a new user account by calling
AuthLoad::CreateNew(string name, SecByteBlock password) this creates a
new user acount by hex encoding the username and appending the extention
".kim" to the file, the file is encrypted with MARS in CBC_CTS mode
using a hash (sha384) of the supplied password. The encryption also
does an HMAC.
To try and login to an existing account, use Login(string name,
SecByteBlock pword), the function will return true if that is a valid
(if you ran "CreateNew" you are already logged in)
To logout of that user, use Logoff();
To force a write to disk, call CommitToFile(); This is done anyway when
the program closes or the user logs off.
To reset the password, call SetActivePassword(Sec..);
To access your contacts for this user, use the notation:
ie: if I wanted to add a contact,
or add a folder:
then you can move "jimbob" if you like:
myAuthLoadObj.Contacts.Move("jimbob", "my friends");
In this way you can add, subtract, move contacts and add an *unlimited*
depth tree of folders/contacts.
You can extract a XMLNode of all your contacts (in the form
"<contacts><folder name = "my friends"><contact
name="jimbob"/></folder></contacts>") via the:
The specifications of AuthLoad are, of course, not set in stone, so we
may add/subtract functions to better use the system.