SQLite Security
- silvercover
- User

- Posts: 86
- Joined: Sat Aug 04, 2007 6:57 pm
SQLite Security
Hi,
I planned to use SQLite in my application. my question is how can I prevent unwanted access to my database and generally how can we protect our databases while they are running locally?
Thanks in advance.
I planned to use SQLite in my application. my question is how can I prevent unwanted access to my database and generally how can we protect our databases while they are running locally?
Thanks in advance.
AFAIK not... perhaps thru the SQLite API but not via a PureBasic directly.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- silvercover
- User

- Posts: 86
- Joined: Sat Aug 04, 2007 6:57 pm
You'd have to put the decrypted file back on the disk though temporarily to read it into a :memory: db though wouldn't you?
@Silvercover, search the forums for ":memory:" and you should find it
@Silvercover, search the forums for ":memory:" and you should find it
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
yes, like pdwyer told you... decrypt the dbfile, open a memory database and
copy the content.
its very easy, just read the sqlite_master table, to build a general solution.
if you need it once more safer, do not save the memory database content into a sqlite file, but rather into a memory block, cryp and save the memory afterwards..
copy the content.
its very easy, just read the sqlite_master table, to build a general solution.
if you need it once more safer, do not save the memory database content into a sqlite file, but rather into a memory block, cryp and save the memory afterwards..
- silvercover
- User

- Posts: 86
- Joined: Sat Aug 04, 2007 6:57 pm
I think you mean you can't use LIKE %%, not select * which is just columns
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
I suppose (thinking off the top of my head here) if you used a byte for byte simple encryption like xor, you might be able to match the search string with the encryption... for xor to be any good though you'd need a very long random key, which would make searching on it a problem
there might be some way to do it though.
hmmm, maybe not, unless the encryption was almost useless
there might be some way to do it though.
hmmm, maybe not, unless the encryption was almost useless
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
- silvercover
- User

- Posts: 86
- Joined: Sat Aug 04, 2007 6:57 pm
SQLite web page implies that there is an encryption feature, but I'm not sure if it's an add on for purchase though.
Looks like they are 3rd party tools like http://sqlite-crypt.com/
How secure does this need to be?
Looks like they are 3rd party tools like http://sqlite-crypt.com/
How secure does this need to be?
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
- silvercover
- User

- Posts: 86
- Joined: Sat Aug 04, 2007 6:57 pm

