> On Sep 10, 2015, at 5:38 PM, Brendan Duddridge <[email protected]> wrote: > > 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?
Yes. You’ll get a 401 status. (Under the hood, the only way to tell a SQLCipher database is encrypted is to try to open it and get a SQLITE_CORRUPT error when SQLite can’t find the header block. There’s no readable data in an encrypted database file; it looks like pure noise.) > 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. That’s in the attachments directory, to handle some edge cases with adding/removing encryption. It’s an implementation detail and I’d discourage using it. —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/222AD493-9AF9-4D90-A424-55B7BEBC6A11%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
