i have a simple Jquery code which is for sending $.ajax request and passing the login information to controller to check for the login credentials. i want to encrypt the data. please let me know how can i do that?.
i am posting my Jquery code here to give you an idea.
=============
Jquery Login Button clcik event
$('#btnLogin').click(function (e) {
var email = $('#Email').val();
var Password = $('#Password').val();
var postdata =
{
"Email": email,
"Password": Password
};
$('.Loading').fadeIn(50);
$.ajax({
url: '@Url.Action("CheckLogin","Home")',
data: postdata,
success: function (msg) {
var data = msg.split(':');
$('#Result').html(data[0]);
$('.Loading').fadeOut(50);
},
error: function (data) {
$('#Result').html(data);
$('.Loading').fadeOut(50);
}
});
开发者_如何转开发 e.preventDefault();
});
========================== as you can see i am passing the username & password in Ajax, when the request goes i can see my username and password in Firebug...
please help ? thx.
Put your entire page on SSL (HTTPS).
This will encrypt all data going up and down the wire.
You'll still see the data in Firebug, but there's nothing wrong with that.
(If the attacker has access similar to Firebug's, there is nothing you can do to defend yourself)
精彩评论