Adam Levitt
Adam Levitt

Reputation: 10476

Securing JSON and ASP.NET MVC2

I'm sending sensitive data back and forth using AJAX requests in my ASP.NET MVC2 application using JSON. If I'm potentially sending back sensitive data back to the client, is there a preferred mechanism of securing the data such that it can then be decrypted by the javascript code? Is there a standard encryption library that I can use in JS and C# together?

Thanks

Upvotes: 0

Views: 122

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038710

Don't send sensitive information to the client. Or if you do, use HTTPS which should protect you from man-in-the-middle. The best is to keep sensitive information on the server. Obviously depending on the level of sensibility and the kind of information you are dealing with there might be different techniques.

Upvotes: 2

Related Questions