SQLCipher ported to Harbour (Windows)

Moderator: Rathinagiri

User avatar
Hazael
Posts: 109
Joined: Thu Jun 24, 2010 11:37 am
Location: France

Re: SQLCipher ported to Harbour (Windows)

Post by Hazael »

Rathinagiri wrote:When I tried to compile an existing project with your library and latest harbour nightly build, I got this error.

Code: Select all

C:/hmg.3.2a/harbour/lib/win/mingw/libhbsqlit3.a(core.o):core.c:(.text+0x2738): undefined reference to `sqlite3_enable_load_extension'
However, if I replace with my library, it works ok. I don't understand why.
Well, I searched a bit and tried to add --enable-load-extension to ./configure

Seems fine. Now please test again: http://dropcanvas.com/0p2bj" onclick="window.open(this.href);return false;
Harbour | GTWVT | MingW | Visual Studio Code
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: SQLCipher ported to Harbour (Windows)

Post by Rathinagiri »

Still I am having the same error.

Now the size of the lib is much less.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Hazael
Posts: 109
Joined: Thu Jun 24, 2010 11:37 am
Location: France

Re: SQLCipher ported to Harbour (Windows)

Post by Hazael »

Rathinagiri wrote:Still I am having the same error.

Now the size of the lib is much less.
Sorry, just realized that the libsqlcipher.a I sent to you is the one automatically generated by the amalgmation process (MSYS).
The correct is to build it from Harbour, isn't it?

So I think I am obviously missing the basics here.

Now that I have sqlite3.c and sqlite3.h from the MSYS process what should I do next? I think I am kind of lost at this point.
Please explain clearly (even the obvious) because I realize it's not obvious to me... :oops:

Thanks for your help.
Harbour | GTWVT | MingW | Visual Studio Code
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: SQLCipher ported to Harbour (Windows)

Post by Rathinagiri »

Once you get this sqlite3.c and sqlite3.h you have to create the sqlcipher.hbp, sqlcipher.hbc and buildlib.bat as mentioned in the first post of this topic and build the library.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Hazael
Posts: 109
Joined: Thu Jun 24, 2010 11:37 am
Location: France

Re: SQLCipher ported to Harbour (Windows)

Post by Hazael »

Hello Rathinagiri,

You are right. I will do it.
Sorry for the delay in answering. I had to go for a trip on an area close to the montains and there is no internet there.
As soon as I can connect again I will let you know if it worked or not.

Thanks for your help.
Harbour | GTWVT | MingW | Visual Studio Code
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: SQLCipher ported to Harbour (Windows)

Post by Rathinagiri »

SQLCipher new version is ready for SQLite version 3.8.4.3 :)

I had not yet tested it. Please do so if you are interested. I will also let you know about the results soon.
libsqlcipher.zip
(436.54 KiB) Downloaded 300 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Hazael
Posts: 109
Joined: Thu Jun 24, 2010 11:37 am
Location: France

Re: SQLCipher ported to Harbour (Windows)

Post by Hazael »

Thank you
Harbour | GTWVT | MingW | Visual Studio Code
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: SQLCipher ported to Harbour (Windows)

Post by Rathinagiri »

I have verified and it works fine.

From SQLite 3.8.3 'WITH' clause is implemented. More details here.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Hazael
Posts: 109
Joined: Thu Jun 24, 2010 11:37 am
Location: France

Re: SQLCipher ported to Harbour (Windows)

Post by Hazael »

WITH looks pretty complex to me... but it's interesting.

By the way which Harbour and MingW version did you use to build the lib?

I would suggest to add this information for any lib you create:

HMG xx.xx
Harbour xx.xx
MingW xx.xx
SQLite xx.xx
SQLCipher xx.xx

As you may know even SQLCipher is not a 100% secure way to keep your data since one can overcome the encryption barrier. The only way is to protect the database from phisical access but it certainly helps a lot and may be suitable for the great majority of the situations.

Thanks again for providing such nice lib.
Last edited by Hazael on Thu Aug 14, 2014 7:28 am, edited 1 time in total.
Harbour | GTWVT | MingW | Visual Studio Code
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: SQLCipher ported to Harbour (Windows)

Post by Rathinagiri »

I will list the versions soon.

Regarding the security I don't understand how one can overcome the encryption barrier if they don't know the password.

The only way the security being breached is to capture the main memory dump since the decrypted data is placed only at main memory.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply