The security of software is an eternal topic that has plagued people, and programmers often stay up late. Novell's network operating system NetWare is known for its perfect and reliable security management mechanism, which provides several effective restrictive measures and detection functions for the security of user login and the prevention of intrusion by illegal intruders. This paper discusses how to establish a perfect software registration security mechanism, effectively manage user login, provide reliable protection for application software, and implement it under Delphi3.0.
Delphi as an excellent programming tool, the function is extremely powerful, makes the development cycle greatly shortened, the generated code runs fast, makes the Windows software design becomes a kind of fun. The basic idea is: Establish the Paradox format of the user Account table users.db, and encryption protection, by the administrator maintenance. Users who are registered in advance and have registered permission in this table may enter the system with their own valid password.
The implementation steps are as follows:
1. Create two subdirectories under the application's home directory (assumed to be C:\Register), named Login and data respectively.
2. Start Database Desktop from Delphi's Tools menu and select Tools/aliasmanager ... Creates a new alias. To do this, in the Alias Manager dialog box, click New, give the alias UserInfo, and point to the C:\Register\Data directory, press keepnew, OK, and so on to save the new alias.
3. Use Databasedesktop to create Paradox 5.0 for Windows Datasheet users.db, which is shown in table 1. In fact, more domains are needed for commercial software.
Domain name type size keyword description
Name A * username
Password A * Register password
Fullname A Full user name
Group I user number
Enabled L registration allowed
4. Set Name,group and enabled to non-airspace (Requiredfield), group with a minimum value of 0, a maximum value of 3, and a default value of 3,enabled to true. User group 0 is a system administrator, can perform almost any operation; user group 1 is a software operator who can perform operations other than user account management, including setting up and deleting data, user Group 2 as a normal user, system resources, no modification permissions, and user Group 3 can only browse system limited information.
5. Password UserPassword protect the users.db table, stored in the data directory. Use Databasedesktop to enter several sample users into the table (see table 2), and then close databasedesktop.
Table 2 sample users of Table Users.db
name |
pa > |
group |
enabled |
supervisor |
AAAAAA |
0 |
true |
bbbb BB |
director User |
1 |
true |
|
"> |
3 |
user1 |
CCCCCC |
border:0;padding:0 >general "User1 1 |
user1 |
dddddd |
2 |
user2 |
eeeeee |
general User2 |
3 |
true |
Table 2 shows that the same user is allowed to enter the system with different identities (user groups), with different permissions. If user User1, register with different password, belong to user Group 1 and 2.