Reputation: 4387
I have a csv file on the server side which is retrieved by the client with a jquery ajax call.
I'd like to hide the text from prying eyes and also ensure the .csv file cannot be viewed or opened using client tools other than my code.
Upvotes: 0
Views: 76
Reputation: 32699
Clients can view whatever data is sent across the wire. So if you don't want them to have the data, don't send it to them.
However, you can make it difficult for them to see the information by encrypting it on the server and then decrypting it on the client. See Encrypt and decrypt a string. Even then, a clever user could examine the memory used by the application. And encryption is a difficult thing to properly implement.
In the end, you're fighting a losing battle though. Is the person authorized to view the data? If so, then just give them the data. If not, then don't send them the data in the first place.
Upvotes: 1