[guardian-announce] Fwd: SQLCipher for Android 2.0.0-RC5
News from the Guardian Project
guardian-announce at lists.people-link.net
Tue Apr 3 10:31:54 EDT 2012
Hi,
Just wanted to share news of the latest release candidate regarding
SQLCipher for Android. Thanks!
-------- Original Message --------
Subject: SQLCipher for Android 2.0.0-RC5
Date: Tue, 3 Apr 2012 07:28:34 -0700 (PDT)
From: Nick Parker <nparker at zetetic.net>
Reply-To: sqlcipher at googlegroups.com
To: sqlcipher at googlegroups.com
Hi folks,
I just wanted to share the release of the latest release candidate for
SQLCipher for Android. The 2.0.0-RC5 build contains three important
additions to the library. With the inclusion of the new sqlcipher core
that adds HMAC page protection a few additions were needed. We have
added a method called
SQLiteDatabase.upgradeDatabaseFormatFromVersion1To2 which will migrate
your 1.x database to the new 2.0 format. Additionally, if you need to
maintain the existing format but wish to use the new 2.0 library we have
added a SQLiteDatabaseHook interface that can be provided to the
SQLiteDatabase.openOrCreateDatabase call providing both preKey and
postKey events. As the name implies, if provided this callback will be
triggered before and after the keying of the database. The following
example would allow you to open a 1.1 database using the 2.0 library.
SQLiteDatabaseHook hook = new SQLiteDatabaseHook(){
public void preKey(SQLiteDatabase database){
database.rawExecSQL("PRAGMA cipher_default_use_hmac = off");
}
public void postKey(SQLiteDatabase database){}
}
SQLiteDatabase database =
SQLiteDatabase.openOrCreateDatabase(databasePath, password, null, hook);
Finally, there is an overload to SQLiteDatabase.loadLibs that allows you
to pass a File which will be used as the location for extracting the ICU
dat file if it is not present on the device (thanks jeffdcamp). This is
especially useful on devices with limited onboard storage, allowing you
to move the ICU expansion to an SD card. I have created a new binary
package available below [1]. Please take a look, we welcome any
feedback. Thanks!
1.
https://github.com/downloads/sqlcipher/android-database-sqlcipher/SQLCipher%20for%20Android%202.0.0-RC5.zip
Nick Parker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.people-link.net/pipermail/guardian-announce/attachments/20120403/ae79ebdf/attachment.html>
More information about the guardian-announce
mailing list