-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How the encryption happens? #74
Comments
What do you mean by "simply copies"? |
After giving the password also its not working. And is there any database named sqlite_master in this? |
Not a database named sqlite_master, but a table. It exists in all sqlite databases. What platform are you using? Android, iOS,... |
currently using Android , on debugging this is the exception occured : Exception has occurred. |
Could you provide the full error stacktrace? Are you trying to open an already encrypted database from assets? Or is the database created from scratch in the device? |
I have created a db with data but not encrypted. I want that to be encrypted and then open. D/Sqflite (32028): Opening db in /data/user/0/com.davidmartos96.example/databases/asset_example.db with PRAGMA cipher_migrate |
@Shruthi125 That stacktrace comes from the example project. Did you change the database from the example? I think it would be better if you can share a sample repo with what you are doing. Otherwise it is very hard to tell what's going on. |
test('Open asset database', () async {
|
What that code does is open an already encrypted database with the password 1234. If you are trying to open a database without password or without a different password it will not work. |
Ok. Thank you. So I have a database with tables and related content in it. And I want to encrypt the data in that database. Please let me know how do I do that using the code |
@Shruthi125 In that case you need to use SQLCipher CLI in a desktop environment to encrypt it, then use it as an asset in the Flutter app. |
Ok. Thankyou. I am using vscode in Windows desktop. So any further requirements? |
You need to install/build SQLCipher for Windows so that from the command line you can run |
I hope this is the script. #!/bin/bash echo "Encrypting $1" echo cp encrypted.db C:/app_mobile/assets/databases/my_app_database.db echo "Done." |
@Shruthi125 Yes, that's the one. |
I followed this video https://www.youtube.com/watch?v=SFHGeetZ0po and did accordingly, but the sqlite3.exe file dint generate. |
@Shruthi125 I'm sorry but I wouldn't be able to help you with that. I have experience building SQLCipher in a Linux machine, not Windows. |
Ok. Thank you |
Closing as this doesn't appear to be a problem with sqflite_sqlcipher itself |
When a database is given, that is not getting encrypted but simply copies. How to resolve that and how does the encryption happen?
The text was updated successfully, but these errors were encountered: