That fuck shit the fascists are using
1package org.tm.archive.database;
2
3import net.zetetic.database.sqlcipher.SQLiteConnection;
4import net.zetetic.database.sqlcipher.SQLiteDatabaseHook;
5
6/**
7 * Standard hook for setting common SQLCipher PRAGMAs.
8 */
9public class SqlCipherDatabaseHook implements SQLiteDatabaseHook {
10
11 @Override
12 public void preKey(SQLiteConnection connection) {
13 connection.execute("PRAGMA cipher_default_kdf_iter = 1;", null, null);
14 connection.execute("PRAGMA cipher_default_page_size = 4096;", null, null);
15 }
16
17 @Override
18 public void postKey(SQLiteConnection connection) {
19 connection.execute("PRAGMA cipher_compatibility = 3;", null, null);
20 connection.execute("PRAGMA kdf_iter = '1';", null, null);
21 connection.execute("PRAGMA cipher_page_size = 4096;", null, null);
22 }
23}