private byte[] GetBufferFromEncryptRequest()
        {
            var idClient = _clientSocket.LocalEndPoint.ToString();

            var cryptoClass = new CryptographyRepository(idClient);

            var json = JsonConvert.SerializeObject(_jsonRequest, Formatting.Indented);

            var encrypt = cryptoClass.Encriptar(json);
            var buffer  = Encoding.ASCII.GetBytes(encrypt);

            return(buffer);
        }
        private JsonResponse ReceiveServerResponse()
        {
            var idClient = _clientSocket.LocalEndPoint.ToString();

            var cryptoClass = new CryptographyRepository(idClient);

            var receivedBuffer = new byte[BUFFER_SIZE];
            var receivedBytes  = _clientSocket.Receive(receivedBuffer);
            var data           = new byte[receivedBytes];


            Array.Copy(receivedBuffer, data, receivedBytes);

            var encryptString = Encoding.ASCII.GetString(data);
            var jsonResponse  = cryptoClass.Desencriptar(encryptString);

            _jsonResponse = JsonConvert.DeserializeObject <JsonResponse>(jsonResponse);

            return(_jsonResponse);
        }