
Originally Posted by
zim
Thanx, So if I was to place the key in the source code i.e. bdapp.cpp that works?
Thats exactly does NOT works!!
apply a little protection in your password. A very simple example :-
suppose your password is "AB".
instead of
database.open(filename, "AB");
database.open(filename, "AB");
To copy to clipboard, switch view to plain text mode
use
database.
open(filename,
QString("BC").
replace('B',
'B'-1 ).
replace('C',
'C'-1 ));
database.open(filename, QString("BC").replace('B', 'B'-1 ).replace('C', 'C'-1 ));
To copy to clipboard, switch view to plain text mode
ofcourse this is a stupid example in itself but anyone who opens your binary in hex editor will only see "BC" as password.
But then this also does not prevent anyone who is going to debug your binary. But at least you get the idea.
I also wanted to know if there is a way to encrypt an existing database?
i dont know a direct way, but i would prefer just to open the old db and export it to a new encrypted one.
Bookmarks