I have an Android application which works with a database need to check for being encrypted, and encrypt it if not. I don’t want to save the encrypted database to a new file. I know I can try opening it with an empty password and catch “Net.sqlcipher.database.SQLiteException: file is encrypted or is not a database” but I don’t like catching exceptions, not the least because they are slow. So I would like to ask if there’s some API in the Android version which can tell me if the database is already encrypted.
Thank you for your time.