How to encrypt particular key value data on Couchbase Mobile

Hi, I am using Couchbase lite. I want to encrypt particular data on the document. Can you please suggest me anything. is there any default encryption algorithm available in couchbase.

Document encryption is tricky because of key management. Who else should be able to decrypt the data? How will they acquire the key?

We don’t provide tools for this. Once you encrypt the data, you can base64-encode the result and store it in the document as a string.

Hi jens. So is it possible to encript only value. Woth any inbuild
alogirthm.

Couchbase Lite only offers full DB encryption. It doesn’t contain any built in ways to encrypt arbitrary pieces of data (it is not a cryptographic library). You will need to do that yourself, but as Jens said be careful how you do it. Security on a mobile platform is a complicated beast.

Sure, it’s possible, but as I said, we don’t provide tools to do it. Go get an encryption library, convert the properties you want to encrypt into JSON, encrypt the JSON data, encode that as base64, and add that string to the document.