How to save data in encrypted format in to Mongo DB


#1

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.


#2

There is the plancifica:encryption package: https://atmospherejs.com/planifica/encryption 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.


#3

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.


#4

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.


#5

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.


#6

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


#7

Hi ,
https://atmospherejs.com/planifica/encryption 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.