Thank you for getting started on the implementation. I think having the metadata handler call for a new db implementation is a good idea-- those new methods are fine, and since only the ImageEditor class makes calls to the metadata handler, it will be easy to implement these changes to the app overall.<div>
<br></div><div>Although the database in the assets folder comes with its main table already set-up, it does not contain any pre-loaded data (other than in the android_metadata table, which is required.) Now that we have SQLCipher up and running, it's the perfect time to work on the Preferences Actitity to prompt the user for a password, and other global info that the metadata will require. I'll be going there next...</div>
<div><br></div><div>Thanks,</div><div>Harlo<br><br><div class="gmail_quote">On Mon, May 9, 2011 at 10:21 AM, Nathan of Guardian <span dir="ltr"><<a href="mailto:nathan@guardianproject.info">nathan@guardianproject.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hans and I have been working on SQLCipher (<a href="http://sqlcipher.net" target="_blank">http://sqlcipher.net</a>) for<br>
Android, and I'm happy to say we have a build of it now that seems to<br>
work pretty well. We have an SDK packaged up with all the JAR and .SO<br>
files needed, so I thought I would try integrating it with Obscura/SSC.<br>
<br>
I am happy to say it works! I modified SSCMetadataHandler to use our new<br>
SQLiteDatabase class:<br>
<br>
import info.guardianproject.database.sqlcipher.*;<br>
<br>
and then instead of loading the .db file from assets, I just create a<br>
new one from scratch on the device, and added the necessary. (I am not<br>
sure why we were preloading the .db file in the first place - preloading<br>
it with data?)<br>
<br>
The only real change to a developer is that somewhere in the main<br>
activity, you have to call. SQLiteDatabase.loadLibs(context) one time,<br>
and then whenever you need to get a db, just use a password:<br>
<br>
db = getWritableDatabase(SQLCIPHER_TEMP_PASSWORD);<br>
db = getReadbleDatabase(SQLCIPHER_TEMP_PASSWORD);<br>
<br>
Right now I am using a static password string, but the real solution<br>
would be to prompt the user with a password or PIN keypad entry screen,<br>
and then have those credentials cache themselves for some period of time.<br>
<br>
All in all, it seems like just a few hours work to implement this, which<br>
is a very exciting prospect.<br>
<br>
+n8fr8<br>
_______________________________________________<br>
Ssc-dev mailing list<br>
<br>
Post: <a href="mailto:Ssc-dev@lists.mayfirst.org">Ssc-dev@lists.mayfirst.org</a><br>
List info: <a href="https://lists.mayfirst.org/mailman/listinfo/ssc-dev" target="_blank">https://lists.mayfirst.org/mailman/listinfo/ssc-dev</a><br>
<br>
To Unsubscribe<br>
Send email to: <a href="mailto:Ssc-dev-unsubscribe@lists.mayfirst.org">Ssc-dev-unsubscribe@lists.mayfirst.org</a><br>
Or visit: <a href="https://lists.mayfirst.org/mailman/options/ssc-dev/harlo.holmes%40gmail.com" target="_blank">https://lists.mayfirst.org/mailman/options/ssc-dev/harlo.holmes%40gmail.com</a><br>
<br>
You are subscribed as: <a href="mailto:harlo.holmes@gmail.com">harlo.holmes@gmail.com</a><br>
</blockquote></div><br></div>