There is a server (php), and there is a client (application on android), a request is sent from the client to the server, the server gives the answer in json format.

Anyone who wants can send the gett request and see the json data.

The question of encrypting this data. That is, you need to encrypt them in php, and decrypt them on the client.

A request is sent from the client to the server, the server sends encrypted data in json format, and the client decrypts it.

Please tell me how to implement this encryption?

  • one
    SSL is normal, isn't it? - Vladyslav Matviienko
  • can you use a secure protocol? (https) - Evgeny Suetin
  • Yes, it was like a similar question. json can not encrypt but the data in it can and encrypt - Naumov
  • @Naumov you are absolutely right, now come to this) How to implement encryption on php and decryption on java - Martinez Toni
  • @MartinezToni secure.php.net/manual/ru/function.openssl-encrypt.php encrypt and decrypt secure.php.net/openssl_decrypt in general, many methods and encryption algorithms. You can also think up your own algorithm (although it is not worth reinventing bicycles). - Naumov

0