0

I am new to web development, i want to know how to hash the data traveling in URL. i have done this so far.

$(document).ready(function () {

    var budget;
    var guest;

    $('#budgetbtn').click(function () {
    var guest = $("#totalguests").val();
    var budget = $("#budgetamount").val();
    if (budget >= 500000 && guest >= 100 && guest <= 500) {
        $('#myModal').modal('hide');
        $('body').removeClass('modal-open');
        $('.modal-backdrop').remove();
        $('#totalguests').val("");
        $('#budgetamount').val("");



        window.location = "Eventtype.aspx?budget="+budget+"&guest= "+guest;
        //window.location = "Eventtype.aspx?budget=" + budget;
        //window.location = "Eventtype.aspx?guest=" + guest;

    }

I want to hash those two values i.e budget and number of guest so that user could not make changes to these values. Kindly help me out with this.

  • The question is whether this really makes sense, given you'll be delivering the hashing mechanism to the client. This means a determined user could change the values and hash them then send the hashed query to your server. In other words this isn't secure so you may be better off accepting that and use a different mechanism for authorisation on the server. – Matt Jun 18 '17 at 09:01
  • can you guide me with that @Matt – Ahsan Hasan Jun 19 '17 at 05:15
  • as you've tagged this as asp.net I'd suggest you start by googling for asp.net authorization and authentication to get you started, you'll need to look for relevant content depending on the version of asp.net you're using but all versions have support for auth. If you get stuck, there's lots of content on here that will help but I'd suggest working through a few tutorials for your version of asp.net first. – Matt Jun 19 '17 at 06:04

0 Answers0