Originally Published in Computer Jagat Magazine
Kazi Sayeda Momtaz (Sharmin)
The encryption process in particularly useful if one wishes to market programs developed in the dBASE programming language and in the case it helps reduce the possibility of unauthorized use. Encrypting command files is also useful in a LAN environment as the Source Code Program, therefore, the actual program listing is not accessible to the users. Moreover, encryption reduces the size of programs by removing the comment lines and indentation and thus results in faster program execution. This process writes the command files in different way and this is why these files cannot be read directly by dBASE III+ or any other DOS program or a standard word processor. However, the encrypted programs still run on dBASE III+.
Another feature of encrypted files is that they can be linked together to generate a single linked file and this helps reduce the number of files present on the disk.
Two separate programs come with dBASE III+ package for encrypting and linking program files viz.
dBCODE and dBLINKER and the package is called RunTime+.
dBCODE is used to encrypt the program files. It removes the comment lines and extra blank spaces from the command file and re\irrites the files in such a fashion that can be understood and run by dBASE III+ or dBRUN but not by any other standard word processor. Command files may be encrypted one file at a time or all command files at a time through a response file.
Now if we want to encrypt our file then we must use encrypt program DBC. COM and we can get this type of file in the “Sample programs and Utilities” diskette in dBASEIII+ package.
dBCODE requires that the file which is to be encrypted should have the file extension name “src”. So we have to copy the program file to some other file name with file extension “.src” with the help of DOS copy command. Lastly, for encrypting the file we have to type
then the monitor displays a massage and asking for a source file name and also promoting that the file name should have “src” as the file extension name. Now if we want to encrypt Test, src file then we have to type
After locating the source file dBCODE encrypts the Test, src file and displays the following message:
Enter a source filename (.src) or press enter to end:
Thus, it has encrypted the Test.src file and generated a new file Test, prg which is the encrypted file. We have to remember that if we want to encrypt a file we have to copy the above-mentioned file to the” .src” extension name before encryption.
When encryption is over, removing the “.src” files from the disk we have to preserve them in a safe place. The encrypted files will run like a normal program, but will not be able to view them. If any modification is required, we can use the “.src” files and then we can encrypt them again.
For encrypting a few files there is a advantage in dBASE III+. Let us assume that we have more than five files and if we want to encrypt them at a time then we can encrypt them in one stroke though a response file. The response file is standard ASCII text file which can be created by MODIFY COMMAND or any text editor. This response file contains only the names of the command files to be encrypted. Each line of this type of file contains one file name and file name followed by J. As for example, to create a response file Test.rsp and to include STUDENT, MARKS, EXAM, SUBJECT, REPORT files in it we have to use the following commands :
.Modi Comm Test.rsp J
and lastly by pressing AW we can save it.
Through the response file if we want to encrypt above-mentioned files then we need to create a directory which is called the source directory and we must copy the above-mentioned files with the file extension name “.src”. After creating source directory we have to create another directory and which is called destination directory which will receive the encrypted files. If we want to know more about dBCODE we must type C:\DBASE>DBC J and then we will get more information about dBCODE. The screen displays all the available options with dBCODE. However, only the required options should be entered. These options may be entered in any sequence and a dash (—) precedes the options letter and different options should be separated by at least a space e.g.
C:DBASE>DBC-Test.rsp-s / Source/-0/Output/ J
where rTest.rsp is the response file, Source is the source directory and output is the destination directory.
The dBCODE reads all the files to be encrypted from the source directory and writes them in the output directory after encryption.
dBLINKER is used to link all the encrypted files together to generate one consolidated application program. dBLINKER reduces the number of program files on the disk and speeds up the execution of a program. Now if we want to link encrypted files then have to use DBL.COM file which is available in the “Sample Programs and Utilities” disk.
Like dBCODE, dBLINKER too can be used to link files in the in the interactive mode or through the response file. To use the interactive mode, we have to use DOS prompt and then we have to type C:DBASE>DBL J and then monitor displays a message and asks a file name to store the final file. After this, it prompts to enter the source file names. After typing the encrypted files one by one DBLINKER generates a final linked-up output file.
For using dBLINKER to link several files in one stroke like dBCODE we can use a response file.
After all files have been correctly linked up, the final file can be run on dBASE III+ or dBRUN. To run the final linked-up file through dBRUN we may use
C:\DBASE>DBRUN Final J
where Final is the final linked-up file. Without dBRUN package we can use the final linked-up file through * dBASE dot prompt e.g., ‘
.Do Final J
dBASE can be used in the Local Area Network (LAN) environment through the dBASE Administrator. The Microcomputers communicate with each other through cables. The purpose of connecting computers in a LAN environment is resource sharing.
dBASE III+ (version 1.1) is supported on three LANs viz.
(1) IBM PC Network
(2) Novell Network
(3) 3Com 3 + Network.
In a LAN environment, a number of users can simultaneously access the same database file and try to modify the same record simultaneously. This may result in unpredictable data in records. To overcome this problem, the dBASE Administrator updates the records sequentially, thus maintaining the index files correctly. The dBASE Administrator locks the file/record before entering any data in it so that other users cannot access the file/record. Moreover., the database files may be encrypted through PROTECT.
PROTECT is a special facility available in dBASE Administrator. It is used for the security of database files. The PROTECT facility, though meant for the LAN environment, can also be used for a single user or for a single computer multi-user configuration. It includes three level of security.
LOG-IN Security; Unless the correct user Group Name, User Name and Password are entered, an access to dBASE III+ is impossible. File and Field Access Security: File and field access security is basically used for a LAN environment, Where different users are assigned different access levels for database files and their fields.
Data Encryption: Data encryption encrypts data i.e., dBASE Administrator rewrites the contents of a database file in such a fashion that they cannot be read. An encrypted file can be read only after decryption. dBASE Administrator automatically encrypts and decrypts the database files to which the user has legitimate access, as required, if accessed after successful log-in.
Using the protection facility we can market our program. So protection facility of dBASE III+ gives us great advantage.
dBASE III Plus made simple with dBASE IV and FoxBASE+ By R.K. Taxali.