Setting a password in SQLCipher

I want to create a new encrypted database with SQLCipher, I really did not understand how to install the key due to the following link: http://sqlcipher.net/sqlcipher-api/#key

As explained in the documentation, I have to install the key using PRAGMA, but where can I use this command?

+4
source share
2 answers

For Android, you just need to call openOrCreateDatabase to provide the encryption key. The second parameter is the passphrase to be used.

SQLiteDatabase database = SQLiteDatabase.openOrCreateDatabase(databaseFile, "test123", null); 

The PRAGMA key interface provides the same function when using the SQLCipher command line.

+1
source

you should read: sqlcipher.net/introduction Assembly instructions should provide you with a utility that will be a command-line shell (based on sqlLite) for SQLCipher.

+1
source

Source: https://habr.com/ru/post/1447299/


All Articles