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

-- 
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/70776c7e-c26c-4902-88d2-2e2be1c09284%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to