Stephen,
Thank you so much for the help. This is precisely what i am looking
for, and I don't have to write any code.
Here's for anyone else how I did it.
1. Get
https://github.com/sjlombardo/sqlcipher-tools/blob/master/decrypt.c
2. Make sure it's in a directory parallel to openssl, then issue this
command to build this console executable:
gcc decrypt.c -I../openssl-1.0.0e/include -l crypto -o decrypt -g
3. Get your encrypted db to current directory as sqlcipher.db
4. Run ./decrypt This decrypt the db and create a new db called
sqlite.db
5. cat sqlite.db (or hexdump -C) to see all clear text of sqlite.db,
or use the regular sqlite3 to open this sqlite.db to verify the
content is well.