Page 1 of 1

Access encrypted SQLite database

Posted: 09.08.2021, 07:28
by Yogi Yang
Hello,

I have managed to access SQLite database I don't know as to how to access encrypted database. What do we have to do to access it?

TIA

Re: Access encrypted SQLite database

Posted: 09.08.2021, 09:48
by aehimself
I never attempted to access an encrypted SQLite database but I can see that there is a connection parameter for SQLIte:

// Type: BOOLEAN
// Encrypt connection
ConnProps_Encrypted = 'encrypted';

ZProp_Encrypted: TZProperty = (
Name: ConnProps_Encrypted;
Purpose: 'Use connection encryption?';
ValueType: pvtEnum; LevelTypes: [pltConnection];
Values: cBoolEnum; Default: cBoolFalse; Alias: '';
Providers: (Count: 1; Items: @cSqlite3upProvider);
Protocols: (Count: 1; Items: @cSQLiteProtocol);
);

I'd try to set this on the SQLConnection object (encrypted=true) and use the password property to supply the password.

Re: Access encrypted SQLite database

Posted: 09.08.2021, 11:19
by marsupilami
aehimself wrote: 09.08.2021, 09:48 I'd try to set this on the SQLConnection object (encrypted=true) and use the password property to supply the password.
I seem to remember that thsi is the correct way to use encryption with SQLite. See viewtopic.php?f=28&t=105825#p136873

We (still) do not support wxsqlite3 encryption.