Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Encrypting data in DBF file Date: Mon, 19 Jun 2017 11:34:30 +0200 Lines: 54 Message-ID: References: <691ec839-e8ee-4a71-a067-a8c4e1ca70b3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: individual.net OjyH4BQVYwoYMKm2DhUZ2wg+Cd+VRTWJKImrPSBvbU/vstAD4= Cancel-Lock: sha1:Wb4RQhHONulcyGPgBhYtRrBUqA4= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:10691 Hi Simon, you should NOT copy the class from the SDK, but build an own class that is inherited from the VO DBServer class: class EncDBServer inherit DBServer method FieldPut( uField, uValue ) class EncDBServer return super:FieldPut( uField, Encrypt( uValue ) ) method FieldGet( uField ) class EncDBServer return Decrypt( super:FieldGet( uField ) ) I'm using similar things for many years now, but now I have a big problem in the migration to .NET as I store binary data in the DBF and the Vulcan RDD does an automatic Ansi to UTF conversion. Therefore I would store the encrypted data only after a mime-enconding. Wolfgang simon@abersoftware.co.uk wrote: > Hi All, > > Anyone have any thoughts on best way to encrypt data fields that are > stored in DBF file. > > The reason is just to stop people looking at the DBF file from > outside the application. > > My initial thoughts were to subclass DbServer and overwrite the > fieldget / fieldput methods to encrypt / decrypt the data. I've > created an EncDbServer Class (copy of DbServer from SDK) and updated > the Fieldget / Fieldput methods. > > I have a StdDataWindow that I open and pass in the EncDbServer > object. This doesn't seem to use the fieldget / fieldput methods from > the EncDbServer. > > Is this the best approach or should I just use my own gather / > scatter methods for this data window? > > Appreciate any ideas or thoughts on best way to achieve this. > > Simon --