I have to face a new little project. It will have about 7 or 9 tables, the biggest of them will grow by a max rate of 1000 rows a month.
Decode chat databases, crack lockscreen pattern PIN password. WhatsApp Contacts, /data/data/com.whatsapp/databases/wa.db. WhatsApp Messages &.
I thought about SQLite as my db... But i will need to protect the db in case anybody wants to change data from the db
My main question is:
Is it possible password protect a sqlite db as you would do on access?
What other RDBMS would you recommend for such a small solution?
The development would be on C#, but i'm searching something free.
Jhonny D. Cano -Leftware-Jhonny D. Cano -Leftware-
9 Answers
You can password protect a SQLite3 DB. Before doing any operations, set the password as follows.
then next time you can access it like
This wont allow any GUI editor to view your data. Some editors can decrypt the DB if you provide the password. The algorithm used is RSA.
Later if you wish to change the password, use
To reset or remove password, use
MangeshMangesh
You can use the built-in encryption of the sqlite .net provider (System.Data.SQLite). See more details at http://web.archive.org/web/20070813071554/http://sqlite.phxsoftware.com/forums/t/130.aspx
To encrypt an existing unencrypted database, or to change the password of an encrypted database, open the database and then use the ChangePassword() function of SQLiteConnection:
To decrypt an existing encrypted database call
ChangePassword()
with a NULL
or '
password:To open an existing encrypted database, or to create a new encrypted database, specify a password in the
ConnectionString
as shown in the previous example, or call the SetPassword()
function before opening a new SQLiteConnection
. Passwords specified in the ConnectionString
must be cleartext, but passwords supplied in the SetPassword()
function may be binary byte arrays.By default, the ATTACH keyword will use the same encryption key as the main database when attaching another database file to an existing connection. To change this behavior, you use the KEY modifier as follows:
If you are attaching an encrypted database using a cleartext password:
To attach an encrypted database using a binary password:
Liron LeviLiron Levi
Use SQLCipher, it's an opensource extension for SQLite that provides transparent 256-bit AES encryption of database files. http://sqlcipher.net
Community♦
AvdaffAvdaff
You can encrypt your SQLite database with the SEE addon. This way you prevent unauthorized access/modification.
Quoting SQLite documentation:
The SQLite Encryption Extension (SEE) is an enhanced version of SQLite that encrypts database files using 128-bit or 256-Bit AES to help prevent unauthorized access or modification. The entire database file is encrypted so that to an outside observer, the database file appears to contain white noise. There is nothing that identifies the file as an SQLite database.
You can find more info about this addon in this link.
rogeriopvlrogeriopvl
One option would be VistaDB. They allow databases (or even tables) to be password protected (and optionally encrypted).
Reed CopseyReed Copsey
for your question about password protecting your sqlite db, i don't think it can be done.
you can encrypt it though, here's some information on that:
it's $149 per platform.
John BokerJohn Boker
If you use FluentNHibernate you can use following configuration code:
Method UsingFileWithPassword(filename, password) encrypts a database file and sets password.
It runs only if the new database file is created. The old one not encrypted fails when is opened with this method.
It runs only if the new database file is created. The old one not encrypted fails when is opened with this method.
BronekBronek
I know this is an old question but wouldn't the simple solution be to just protect the file at the OS level? Just prevent the users from accessing the file and then they shouldn't be able to touch it. This is just a guess and I'm not sure if this is an ideal solution.
David PriceDavid Price
Why do you need to encrypt the database? The user could easily disassemble your program and figure out the key. If you're encrypting it for network transfer, then consider using PGP instead of squeezing an encryption layer into a database layer.
Trever FischerTrever Fischer
protected by Community♦May 3 '17 at 12:04
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?
Not the answer you're looking for? Browse other questions tagged c#sqlite or ask your own question.
Categories
Arts & Humanities
Beauty & Style
Business & Finance
Cars & Transportation
Computers & Internet
Consumer Electronics
Education & Reference
Entertainment & Music
Family & Relationships
Food & Drink
Games & Recreation
Health
Home & Garden
Others
Politics & Government
Pregnancy & Parenting
Science & Mathematics
Society & Culture
Travel
| ||||||||||
We need your help! Please help us improve our content by removing questions that are essentially the same and merging them into this question. Please tell us which questions below are the same as this one:
|
Leader BoardWhat's this?
Leading Today | Pts | Helpful | ||
1. | earose201 | 200 | 73% | |
2. | sarang_4u | 200 | 79% | |
3. | app_scope | 200 | 100% | |
4. | dhayakaru | 200 | 100% | |
5. | xak764 | 200 | 76% | |
6. | cassie24 | 200 | 100% | |
7. | methodpop | 200 | 66% | |
8. | nazenborg | 200 | 82% | |
9. | TechNhieS | 200 | 79% | |
10. | Khalel | 200 | 75% | |
11. | PVL | 200 | 71% | |
12. | ihateRed1 | 200 | 76% | |
13. | Barbara B | 37 | 92% | |
14. | LewisLewi | 37 | 100% | |
15. | Vesoni | 24 | 100% | |
Leading this Week | Pts | Helpful | ||
1. | ait2 | 400 | 84% | |
2. | elitehear | 400 | 62% | |
3. | Barbara B | 387 | 92% | |
4. | kyoichi.a | 200 | 76% | |
5. | jersoncut | 200 | 82% | |
6. | mr.romeo | 200 | 99% | |
7. | achinta40 | 200 | 97% | |
8. | musadiq | 200 | 95% | |
9. | jbonaoy01 | 200 | 92% | |
10. | app_scope | 200 | 100% | |
11. | methodpop | 200 | 66% | |
12. | chealday | 200 | 73% | |
13. | brettfors | 200 | 100% | |
14. | King txab | 200 | 100% | |
15. | assondhi | 200 | 83% | |
16. | NoAx | 200 | 82% | |
17. | Sizani | 200 | 97% | |
18. | kentnico3 | 200 | 69% | |
19. | elza9698 | 200 | 100% | |
20. | lilbuddy6 | 200 | 100% | |
Leading this Month | Pts | Helpful | ||
1. | lavignero | 2000 | 100% | |
2. | MD Wasim | 1400 | 100% | |
3. | akosiars | 1200 | 88% | |
4. | Barbara B | 992 | 92% | |
5. | Aftab6. A | 800 | 100% | |
6. | shadowgho | 800 | 84% | |
7. | kfa13 | 800 | 72% | |
8. | peetabrar | 800 | 93% | |
9. | Arbi2k | 800 | 83% | |
10. | nazenborg | 600 | 82% | |
11. | chealday | 600 | 73% | |
12. | kbandeleo | 600 | 69% | |
13. | kartiksho | 600 | 90% | |
14. | daditomi | 600 | 74% | |
15. | kuramathe | 402 | 82% | |
16. | Gheezmo | 400 | 71% | |
17. | ait2 | 400 | 84% | |
18. | brotakz | 400 | 100% | |
19. | johnphili | 400 | 98% | |
20. | elitehear | 400 | 62% | |
21. | methodpop | 400 | 66% | |
22. | kunleomob | 400 | 100% | |
23. | https://w | 400 | 83% | |
24. | nikhil.pa | 400 | 93% | |
25. | assondhi | 400 | 83% |