Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you encrypt foxpro database files ?

Status
Not open for further replies.

randallJ

IS-IT--Management
Aug 15, 2000
90
GB
Other than moving to SQL Server, are there any utilities available to encrypt Foxpro database files. [sig][/sig]
 
There is no native protection that I am aware of. I researched it a few years ago and there were several add-ons available for $$. I wrote my own cypher system once... but ultimately it was more trouble then the marginal security it provided me. (Not to mention the performance hit...)

Perhaps someone else will no better. [sig]<p> Pete<br><a href=mailto:blindpete@mail.com>blindpete@mail.com</a><br><a href= > </a><br>What your mother told you is true! You will go blind! (from moonshine anyway)[/sig]
 
I've written a routine several years ago that uses SYS(15) to do very basic character-for-character encryption. Its pretty straightforward, but keep in mind there is a performance penalty in doing a lot of en/decrypting. I only used it for password fields.

If you need more info on this technique, let me know. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
The bottom line answer to your question,AFAIK, is No. You can encrypt the data contained in VFP tables, but a user can still view/change the data. If you're wanting to secure your data, SQL Server is the way to go.

Here's a snippet of simple encryption:

FUNCTION Encrypt
LPARAMETERS tcStr

LOCAL x
LOCAL lcRetStr
LOCAL lcTrnStr

*validate the parm
IF TYPE('tcStr')<>'C'
RETURN .F.
ENDIF

lcTrnStr=''

FOR x=255 TO 1 STEP -1
lcTrnStr=lcTrnStr+CHR(x)
ENDFOR

lcRetStr = SYS(15,lcTrnStr,tcStr)

RETURN lcRetStr
ENDFUNC [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Focus on the solution....Not the problem.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top