1. Generic Access Control v1.0 beta
- Posted by Alan Tu <ATU5713 at COMPUSERVE.COM> Apr 15, 1999
- 334 views
- Last edited Apr 16, 1999
Hi all, This is Generic Access Control v1.0 beta. It uses the exportable secure hash algorithm SHA-1 ported to Euphoria by Davi T. Figueiredo to limit access to anything coded by an Euphoria program. I'm trying to judge demand, so please e-mail me if you want this. If you= find the beta useful, perhaps you can remember to vote for this program when it goes on the website. (Robert, don't worry. SHA-1 is freely exportable. No crypto here!) The documentation hasn't been written yet. But here's a comprehensive rough outline. Just include ACCESS.E and you have access to the following seven routines= : loadAF() loads (or creates) an access database in the current directory Quirk Note: The access database will be created in the current directory.= = For the beta release, I suggest you copy the two .E files into your Euphoria program source directory and run the program from the source's directory. I hope to make this unnecessary in the future. Also, you cannot have two programs running ACCESS.E in the same directory, unless y= ou want the programs sharing the access database. saveAF() save any additions/changes to the access database to disk purgeAF() purges the entire access database on the disk i =3D addAC(sequence username, sequence password) Add the username and password to the access database in memory. The password is hashed using SHA-1, which is a one way hash. i can be AC_SUCCESS: successfully added AC_FAIL: the username already exists i =3D delAC(sequence username) deletes the username from the access datab= ase i can be AC_SUCCESS deleted NO_ENTRY no such username in access database i =3D verify(sequence username, sequence password) finds the username in = the database, hashes the input password and compares it with the hash value i= n the database i can be GRANTED matches DENIED passwords do not match NO_ENTRY no such username in database changepass(sequence username, sequence old_pass, sequence new_pass) changes the password of the username. First verifies the old password an= d then replaces the hash of the old password to the hash of the new passwor= d i can be the same values as function verify Please let me know about any comments or suggestions. Thanks. Alan =