Fully encrypted SQLite DB with PB 5.71 and SQLCipher.dll

Share your advanced PureBasic knowledge/code with the community.
infratec
Always Here
Always Here
Posts: 7577
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Fully encrypted SQLite DB with PB 5.71 and SQLCipher.dll

Post by infratec »

loulou2522 wrote: HI Infratec,
Can you explain me what runtime is ? and the utility to decode password in runtime ? Thanks in advance
This means only that you can use an InputRequester() or a StringGadget() to enter the password.

If you don't know the password, you have not really a chance to open the database.
MarkOtt
User
User
Posts: 28
Joined: Sat Feb 11, 2017 8:33 pm
Location: Switzerland

Re: Fully encrypted SQLite DB with PB 5.71 and SQLCipher.dll

Post by MarkOtt »

Yuri_D wrote:Hello!

I'm not sure what's wrong but when I'm trying to use this solution I'm getting an error on OpenDatabase() command (PB v5.72):

[16:55:33] [ERROR] UseODBCDatabase(), UseSQLiteDatase() or UsePostgreSQLDatabase() need to be called before using database commands.

Did anybody try it on later PB releases?
@Yuri_D
@totorcalais

Tested and working on PB 5.73 x32 and x64.

But, with PB x64 also the 64bit version of "sqlcipher.dll" is needed. ;-)
Eg. contained in the "DB Browser for SQLite for 64bit Windows".

Furthermore:
In the current version 3.12.1 of "DB Browser for SQLite" the version of "sqlcipher.dll" has changed to 3.31.0.0 which additionally needs the lib "libcrypto-1_1.dll" (additional 3 MB).

My original test was done with version 3.27.2.0 of "sqlcipher.dll" (eg. included in "DB Browser for SQLite" version 3.11.2), which did not need this additional lib yet.

Regards. Markus
loulou2522
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Oct 14, 2014 12:09 pm

Re: Fully encrypted SQLite DB with PB 5.71 and SQLCipher.dll

Post by loulou2522 »

MarkOtt wrote:
Yuri_D wrote:Hello!

I'm not sure what's wrong but when I'm trying to use this solution I'm getting an error on OpenDatabase() command (PB v5.72):

[16:55:33] [ERROR] UseODBCDatabase(), UseSQLiteDatase() or UsePostgreSQLDatabase() need to be called before using database commands.

Did anybody try it on later PB releases?
@Yuri_D
@totorcalais

Tested and working on PB 5.73 x32 and x64.

But, with PB x64 also the 64bit version of "sqlcipher.dll" is needed. ;-)
Eg. contained in the "DB Browser for SQLite for 64bit Windows".

Furthermore:
In the current version 3.12.1 of "DB Browser for SQLite" the version of "sqlcipher.dll" has changed to 3.31.0.0 which additionally needs the lib "libcrypto-1_1.dll" (additional 3 MB).

My original test was done with version 3.27.2.0 of "sqlcipher.dll" (eg. included in "DB Browser for SQLite" version 3.11.2), which did not need this additional lib yet.

Regards. Markott
Hi Markus
Did you know how to decipher a sqlite database when you know the password
THanks
MarkOtt
User
User
Posts: 28
Joined: Sat Feb 11, 2017 8:33 pm
Location: Switzerland

Re: Fully encrypted SQLite DB with PB 5.71 and SQLCipher.dll

Post by MarkOtt »

loulou2522 wrote: Hi Markus
Did you know how to decipher a sqlite database when you know the password
THanks
@loulou2522

You can open and read the database as shown in the program in the first post, then store it unciphered again.

Alternatively you can use the mentioned "DB Browser for SQLite", it is free to use.
https://sqlitebrowser.org/

Regards. Markus
Post Reply