Is it possible to generate a read-only CSV file?

2.6k Views Asked by At

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.

1

There are 1 best solutions below

0
gbajson On

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