FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DECRIPT AND CRIPT
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
DECRIPT AND CRIPT
Posted: Tue Apr 12, 2011 02:21 PM

i LIKE TO CRIPT AND DECRIPTA A DBF FILE FOR USE IT ONLY FROM FWH APPLICATION

ANY IDEA ?

Best Regards, Saludos



Falconi Silvio
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 05:31 AM
Silvio:

The SIX driver has the following functions:
Sx_DbfEncrypt()
Sx_DbfDecrypt()

This RDD does the rest for you. I used it under DOS without problems. xHarbour (commercial) supports it.
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 06:33 AM

but this cript and decript all records I wish cript only one field of a record

Best Regards, Saludos



Falconi Silvio
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 07:06 AM

Sylvio:

Clipper or Clipper Tools use to have the CRYPT() function. Check if it has been implemented in xHarbour. Also the SIX RDD have the Sx_decrypt() function.

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 07:20 AM
Silvio,

in xHarbour there is a function called crypt ()

Code (fw): Select all Collapse
Crypt( <cString>, <cPassWord> ) --> cResult


You can save the crypted value to the field an decrypt it on reading

Code (fw): Select all Collapse
dbf->field := Crypt ("String", cPassword)

and 

value := Crypt (dbf->field, cPassword)
kind regards

Stefan
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 07:38 AM

ok but then to decript it ?

Best Regards, Saludos



Falconi Silvio
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 09:30 AM

Please search FIVEWIN samples for "Crypt" and you find working samples.
Regards,
Otto

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 09:46 AM
Silvio wrote:ok but then to decript it ?


with the same command

Code (fw): Select all Collapse
cCrypt  := Crypt ("String", cPassword)  // crypt string

cDecrypt := Crypt (cCyrpt, cPassword) // decrypt string
kind regards

Stefan
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 02:40 PM

I believe the SIX RDD has built-in, optional, encryption. I have not used it so I can't be of any further help on this.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1283
Joined: Fri Feb 10, 2006 02:34 PM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 04:31 PM

S,

The best solution -> ADS. You don't reinginiering, and it's free for local mode.

Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
HIX -> https://github.com/carles9000/hix
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: DECRIPT AND CRIPT
Posted: Wed Apr 13, 2011 04:45 PM

Silvio
I agree with Carles, ADS is the best solution for encripted database.
ADS is easy to learn; almost 100% compatible with your code and DBF files.

The ADS Data Dictionary is an advanced tool (also free), that includes also SQL, at the same level that most expensive relational databases.

Regards

George

Continue the discussion