wheresvic / mongoose-field-encryption

A simple symmetric encryption plugin for individual fields. Dependency free, only mongoose peer dependency.
MIT License
74 stars 32 forks source link

Using model.findOne({fieldname: fieldvalue}) doesn't return results if the fieldName is an encrypted field. #37

Closed sridaradappt closed 4 years ago

sridaradappt commented 4 years ago

Using model.findOne({fieldname: fieldvalue}) doesn't return results if the fieldName is an encrypted field. Any idea to how to get the document ?

But using model.findOne({_id: docId}) returns data.

Need help

sridaradappt commented 4 years ago

As a workaround, i tried using the method which is mentioned for "Search over encrypted fields" and I was able to make this work.

khannavijayt commented 2 years ago

As a workaround, i tried using the method which is mentioned for "Search over encrypted fields" and I was able to make this work.

can we do search with partial data of encrypted field like populating contacts based on search input while name and number are encrypted. Please let me know if any example available with node.js