How to save data in encrypted format in to Mongo DB

There is accounts-ui package of meteor which will take care password encryption and decryption, like that any package which allows me to apply encryption while saving in to DB and decryption when showing at client side of the required data.

There is the plancifica:encryption package: but it may be overkill.

You’re may be better off using an npm library like sodium-encryption which works on the server or the client, depending on your use case.

1 Like

Thanks @heschong,

Actually for entire application two or 3 fields of entire documents, wants to keep in encrypted format I searched got “Mylar”, but really doubt about it’s maintenance. According to my requirement can you suggest the package.

Yes, Mylar is no longer being maintained. I believe that one of the developers explained some shortcomings in the Mylar approach in one of the github issues in its repo. For your use case it does seem better to use a package like the one I mentioned from npm and just add the hooks in yourself.

Btw the big selling point of Mylar was that you could still do searching across the encrypted data. Remember that using traditional encryption links you will be able to read and write encrypted data but not search within it.

1 Like

Thank you for your suggestion, I will go through it.

Hi , is not the plugin for saving data in to db in encrypted format. It is working only for client side, If i try to add it to server side giving errors.