When I normally return the Ajax/JSON from PHP, the Javascript get it and stores it inside a variable, like: var myJSON = ajaxReturnedJSON; Then Javascript read it.
I'm seriously curious to know if, php encrypts the json:
echo json_encode($encrypted_data); //using some key like: "abc123"
- Then, can
Javascriptdecrypt it back by using same key? - Is there any common
encrypt/decryptmethod between php and js?
Note: I understand key will be visible at JS side but i can also use JS Obfucators to hex the whole characters, whole JS file. So more or less it will protect, rather then plain/nothing.
Welcome to any ideas and discussions.