Skip to content

Specify Key Directly #102

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

Closed
franziskuskiefer opened this issue Aug 28, 2013 · 3 comments
Closed

Specify Key Directly #102

franziskuskiefer opened this issue Aug 28, 2013 · 3 comments

Comments

@franziskuskiefer
Copy link

SQLCipher allows to specify the used key directly (not using a password).
From SQLCipher:

The hexrekey pragma may be used to rekey to a specific binary value

PRAGMA rekey = "x'2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99'";

This can be accomplished programtically by using sqlite3_rekey;

sqlite3_rekey(sqlite3 *db, const void *pKey, int nKey)

Am I missing something or is this not possible with the Android SQLite API?

@developernotes
Copy link
Member

Hi franziskuskiefer,

The interface within SQLCipher for Android to execute the PRAGMA rekey command is via the rawExecSQL call on the SQLiteDatabase instance. Here is an example of the usage from our test suite.

@franziskuskiefer
Copy link
Author

Oh, missed that. Thx :)

@developernotes
Copy link
Member

No problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants