0

for legal reason I should let the customer be able to download a CSV file but she/he should be able only to read it, not modify it. What's a common way of handling this use case? Some kind of signature on the file so that if it's modified you can see it's not in his original form?

I don't need a solution bound to a specific language, I would just like to know what is the best practice.

dierre
  • 7,140
  • 12
  • 75
  • 120

1 Answers1

3

If customer will be able to download this file into his computer, than you can't stop her/him from modifying it. However, you may easy detect changes, the easiest will be generating a cryptographic hash function for the file, i.e.:

$ sha256sum data.csv
eea8254c7500ba3de996aa8ad6af399183f04e17d4a8102fde539dbc93a90012  data.csv
gbajson
  • 1,531
  • 13
  • 32