Hi,
What's the best way to detect if a database file is encrypted? Is it just a matter of trying to open it up with no key provided?
In the header for CBLManager it says that if I don't call - [CBLManager registerEncryptionKey:forDatabaseNamed] with a valid key, then subsequent calls to - [CBLManager existingDatabaseNamed:error] will fail with a 401 error.
You also mentioned somewhere (I've forgotten where now) that there will be a file created called "encrypted" or something to indicate if a database file has been encrypted. Should I perhaps just look for the existence of that file to determine if a database is encrypted or not? That seems like an implementation detail and would be prone to error if you ever changed how that worked, so doesn't sound like a good idea to me.
I'm just trying to decide when I should ask the user for an encryption key to be able to open up their database. If it's not encrypted I obviously don't ask for one.
Thanks,
Brendan