-1

How to encrypt JavaScript code for securely sending score to server. Any ideas?

Comments
  • 5
    Don't encrypt stuff. It makes it hard to read.
  • 0
    @Peekaboo ..then what can we do to securely send value
  • 2
    @vijay7002 theres something called ssl
  • 0
    @liammartens unfortunately that stuff also fucks with reading.
  • 0
    @Peekaboo .
    Actually my problem any body can make change in browser console. One can change variable value in console and can send it through Ajax as it is easy make changes in JavaScript in console. So for that can we do something
  • 6
    @vijay7002 No, there is no such thing as 'client security'
  • 0
    @norman70688
    Ok. thanks
  • 0
    Or you can wrap your score values in a closure with get/set methods. Maybe add anothere variable like canBeEdited, which would be true until you yourself set the score, then make it false. That way, it can't be rewritten maliciously.
  • 0
    Jscrambler is currently safe iirc
  • 1
    @AllenII i. The end, it's still code on the users machine...
  • 0
    @AllenII @pascalwacker .yup😢
  • 0
    Any other solution
  • 1
    @vijay7002 well, say the game is a 2d platformer. Keep track of player position rather than just sending when they get a coin. If a player moves too much between transmissions, then they are cheating. If their position is on a coin, accept the score server side. That's one way, but definitely not the only way.
Add Comment