650) this.width=650; "src=" Http://183.61.143.148/group1/M00/02/54/tz2PlFQ_ZziyvEvLAAAlx7PZzpc216.jpg "style=" border:0px; "/>
every thing will have its own weak link, of course, VFP is no exception. In VFP, there is a very weak link is the database of poor confidentiality. Because. DBF files are open and can be browsed even with the simplest type command in DOS, so the small series encrypts the data in the following two ways:
1. When adding data to a free table, encrypt the data when the free table is updated, and then decrypt the data when it is read.
2, with VFP provided by the low-level file function to encrypt, the encrypted file cannot open, browse, use, and then execute the encryption program can restore the encrypted free table.
* * Encrypt database program (also decryption program) * *
set Talk off
Close All
Clea
@10,10 Say″ Please enter the name of the free table to encrypt (with extension): ″get file1 defa′′
Read
Handle=fopen (″&file1″,2)
if Handle<0
@14,10 Say″ cannot open file!″
=inkey (0)
Retu
endif
j=0
Do While . not.feof (handle)
Bb=fread (handle,1)
CC=CHR (mod (for ASC (BB) +128,256))
=fseek (handle,j)
=fwrite (HANDLE,CC)
? ASC (BB), ASC (CC)
j=j+1
Enddo
=fclose (handle)
Close All
Return
there's more . Database Tutorials knowledge can be landed on E mentor Network.
Effective encryption of VFP database by file function