Hi Sean,
In a scenario where you are attempting to open a SQLCipher database, but
are unsure if it was encrypted with a password you could perform a query
such as:
select count(*) from sqlite_master;
In the event that you did not provide a PRAGMA key = '...', but the
database was encrypted you would get an error back saying:
Error: file is encrypted or is not a database.
Note, if you were to provide a PRAGMA key = '...', however the key value
is incorrect, you will get the same error message. Thus, getting a
result back without an error in the first situation would validate the
database is in fact unencrypted and the second case identifies an
invalid password.
--
Nick Parker