Closed Shruthi125 closed 1 year ago
@Shruthi125 to confirm that you correctly installed SQLCipher on your Windows you can do the following.
Open a cmd and then do the following
> sqlcipher # This would be the executable that you compiled. Maybe it's called simply sqlite when building, I'm not 100% sure
> PRAGMA cipher_version();
It should output something along the lines of SQLCipher Community Version 4.x
Yes, I got that--- sqlite> PRAGMA cipher_version;
4.5.4 community.
What are the commands to be run on the prompt to encrypt an already created db with multiple tables in it?
This script encrypts a database passed by parameter #74 (comment)
Then it copies it to the assets folder in your app
Please let me know about the prompt run commands other than git bash script
@Shruthi125 While inside a SQLCipher session with the regular sqlite database opened, you can run this.
ATTACH DATABASE 'encrypted.db' AS encrypted KEY '123456ABC'; SELECT sqlcipher_export('encrypted'); DETACH DATABASE encrypted;
It will create a new file named encrypted.db
Ohk. Thank you! Let me check if its working.
@Shruthi125 to confirm that you correctly installed SQLCipher on your Windows you can do the following.
Open a cmd and then do the following
> sqlcipher # This would be the executable that you compiled. Maybe it's called simply sqlite when building, I'm not 100% sure > PRAGMA cipher_version();
It should output something along the lines of SQLCipher Community Version 4.x
The .exe file that got installed is sqlite3. Is there any other exe file to be built?
@Shruthi125 I don't think so. You could rename it to sqlcipher.exe or leave it as is. Sqlcipher is an extension on top of regular Sqlite, you can use it like a regular Sqlite by not providing a password.
Closing, as this is not exactly an issue. You can open a discussion instead.
This script encrypts a database passed by parameter https://github.com/davidmartos96/sqflite_sqlcipher/issues/74#issuecomment-1639483647
Then it copies it to the assets folder in your app