I use the free ADS encryption. It encrypts the entire file.
So does the Six RDD. I was responding to Jack's request to just encrypt a couple of fields. I don't know if the Six RDD will do this, but I don't know why it would be useful either.
James
I use the free ADS encryption. It encrypts the entire file.
(x)Harbour supports three functions to handle encryption / decryption transparently:
1. Sx_DBFencrypt (cPassword) - encrypts all records in database file.
2. Sx_DBFdecrypt () - decrypts all records in database file.
Most of the SX functions are documented in the SIX3.NG. It´s a 500kb file. I have it but I´m not sure it´s allowed to publicly share it. If yes I can upload it to my FTP server, if not I can send as email attachment. Just let me know.
James Bott wrote:What would be really nice is just something like SET ENCRYPTION ON, then using the database as you normally would. Is this possible? Or, better yet, if the Six RDD could automatically detect if the file was encrypted, and then automatically (and transparently) encrypt and decrypt the data as needed. Now that would that be nice!
Please have a look at Marco's message at the start of this thread.
James,
I think you have not read Marco's message carefully. Please do it. ![]()
EMG
James, Enrico:
The Sx_DBFencrypt & Sx_DBFdecrypt functions are used in a separate program, as the one I posted earlier in this post's thread. Afterwards you just open your DBF files and call the Sx_SetPass (cPassWord) function. The SIx driver handles everything transparently, meaning that you DON'T have to decrypt / encrypt any record at all before / after processing. It's done all automatically. As Antonio posted in one of my posts, all drivers (DBFCDX, DBFNTX) on Harbour supports these functions.
As to how to find out if a DBF is encrypted, you can use the Sx_TableType() and it will return a. 1 - for non encrypted b. 2 - encrypted. You can also encrypt the file a couple of times, just make sure you decrypt it in reverse order.
This function encrypts the whole record without the need to set all field types as character ones. It is not possible to encrypt just a couple of fields only. As James pointed out, it will be useless, better to encrypt all data fields.
Hope this clarifies a couple of questions.
FUNCTION MAIN()
USE MYTABLE EXCLUSIVE
? SX_DBFENCRYPT( "EMAG" )
? SX_TABLETYPE()
INKEY( 0 )
RETURN NILHi.
By simply changing to ADS rdd, you get to use their encryption functions on free .dbf tables as well as data dictionary bound tables -- and it is all very well documented on the help file.
Reinaldo.
FUNCTION MAIN()
USE MYTABLE EXCLUSIVE VIA "SIX" <--- AFTER THIS SX_TABLETYPE() WILL RETURN A 2
? SX_DBFENCRYPT( "EMAG" )
? SX_TABLETYPE()
INKEY( 0 )
RETURN NILHunterEC wrote:For encryption / decryption via the Sx_DBFencrypt() and Sx_DBFdecrypt() you have to open the DBF with the SIX driver.
REQUEST SIXCDX
FUNCTION MAIN()
USE POLIZZE EXCLUSIVE VIA "SIXCDX"
? SX_DBFENCRYPT( "EMAG" )
? SX_TABLETYPE()
INKEY( 0 )
RETURN NIL#include "Hbsix.ch"
REQUEST SIXCDX
FUNCTION MAIN()
USE POLIZZE EXCLUSIVE VIA "SIXCDX"
? SX_DBFENCRYPT( "EMAG" )
? SX_TABLETYPE()
INKEY( 0 )
RETURN NILHunter,
OK, I got SIX encryption working. Decrypting on the fly. I love it! This is going to be really useful.
Do you know what form of encryption is being used? I'm sure my customer's are going to want to know.
Regards,
James
Enrico,
It seems to be really transparent. You don't even need the REQUEST or the VIA.
Are you sure you are starting with an unencrypted file?
James
James Bott wrote:Are you sure you are starting with an unencrypted file?