CSFLE of specific fields nested in array of objects

Hello, I’m trying to encrypt a specific field in an object, that is inside of an array, using CSFLE.
For example:

{
  "ArrayField": [
    {
      "NonEncryptedField": "NonEncryptedData",
      "EncryptedField": "EncryptedData"
    },
    {
      "NonEncryptedField": "NonEncryptedData",
      "EncryptedField": "EncryptedData"
    }
  ]
}

I cannot encrypt the whole data because of heavy write/read operations.
Is it possible to encrypt that data? If so, Is there any reference for that in C# ?

Hi , Im upping this thread, does anyone has an answer?

Hello Skr_Official,

Thanks for the question. In our CSFLE documentation there is a section for what we call Explicit Encryption, where you manually specify the encrypt and decrypt calls. At the top left of the page is a “Select your language” box and you can choose C# to get specific code examples.

I hope that helps,

Cynthia

Is it possible only with Explicit Encryption?
I cant do it using Auto Encryption?

basically I am migrating from an object field , to an array of objects, so I want to keep the usage as same as possible.
Thank you very much :slight_smile:

Hi Skr_Official,

It is not possible via automatic encryption, the only way to do it is via explicit encryption.

Thanks,

Cynthia