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.I use the free ADS encryption. It encrypts the entire file.
James
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.I use the free ADS encryption. It encrypts the entire file.
This leaves me wondering, are there functions to encrypt and decrypt a record (or field)? I can't see how decrypting an entire DBF would be practical in an application.(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.
Please have a look at Marco's message at the start of this thread.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!
Hmm, I guess you are telling me, no there are no record or field level decryption Six functions?Please have a look at Marco's message at the start of this thread.
Code: Select all
FUNCTION MAIN()
USE MYTABLE EXCLUSIVE
? SX_DBFENCRYPT( "EMAG" )
? SX_TABLETYPE()
INKEY( 0 )
RETURN NIL
Code: Select all
FUNCTION MAIN()
USE MYTABLE EXCLUSIVE VIA "SIX" <--- AFTER THIS SX_TABLETYPE() WILL RETURN A 2
? SX_DBFENCRYPT( "EMAG" )
? SX_TABLETYPE()
INKEY( 0 )
RETURN NIL
Sorry, no changes I'm still missing something...HunterEC wrote:For encryption / decryption via the Sx_DBFencrypt() and Sx_DBFdecrypt() you have to open the DBF with the SIX driver.
Code: Select all
REQUEST SIXCDX
FUNCTION MAIN()
USE POLIZZE EXCLUSIVE VIA "SIXCDX"
? SX_DBFENCRYPT( "EMAG" )
? SX_TABLETYPE()
INKEY( 0 )
RETURN NIL
Code: Select all
#include "Hbsix.ch"
REQUEST SIXCDX
FUNCTION MAIN()
USE POLIZZE EXCLUSIVE VIA "SIXCDX"
? SX_DBFENCRYPT( "EMAG" )
? SX_TABLETYPE()
INKEY( 0 )
RETURN NIL
Of course.James Bott wrote:Are you sure you are starting with an unencrypted file?