2

I have a field in Mongodb that contains large amounts of user data.

I need to apply SHA256 or SHA512 to the contents of the field while keeping the original.

I need another field to be generated with the SHA values of the original field.

I would like to automate this task, does anybody have any suggestions?

Community
  • 1
  • 1
Dan
  • 51
  • 4
  • There are some possible recommendations on this [post](http://stackoverflow.com/questions/9691316/how-to-listen-for-changes-to-a-mongodb-collection?noredirect=1&lq=1) that might work for you. However, if your collection is being updated by a program, then it might be easier to add the extra logic in there. – Robert Seaman Apr 22 '17 at 18:45
  • 2
    So? Just make a script to read through the collection, calculate the hashes and store the new fields. – Sergio Tulentsev Jul 11 '17 at 10:06

0 Answers0