1. Home
  2. Docs
  3. UniREST Solution 3.5
  4. Getting Started
  5. How Communication Works
  6. Encryption

Encryption

When you set up the UniREST Server application for the first time, it generates a security key. This key is very important because the communications between your Unity project and your Server are encrypted.

This key must be kept secret and must be used in the UniREST Client setup. In this way, both UniREST Client and Server have the same key and they can ''talk to each other with the same language''.

When your Unity game (UniREST Client) has the need to perform a Server-side operation (UniREST Server):

  1. the Client sends a request to the Server. This request is encrypted with the secret key and then sent;
  2. the Server receives the request, decrypts it with the secret key and then elaborates it;
  3. if the Server replies, it encrypts the reply and sends it to the Client;
  4. the Client receives the Server‘s reply, decrypts it and then elaborates it.