Ignore:
Timestamp:
Jul 15, 2016, 1:24:05 PM (3 years ago)
Author:
joamuran
Message:

Added aes encryption for n4d answers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin-center/trunk/fuentes/admin-center.install/usr/share/admin-center/n4d.php

    r2140 r2185  
    11<?php
     2include("./libphp/cryptojs-aes.php");
     3
    24//require_once("logServer.php"); -> No s'usa!
    35//require_once('php_lib/wsclient/vendor/autoload.php'); -> No s'usa !
     
    3537 
    3638  return $newsource;
     39}
     40
     41function AESEncrypt($plain){ 
     42  if (isset($_POST['pass'])) $pass=$_POST['pass'];
     43  else $pass=""; 
     44  return cryptoJsAesEncrypt($pass, $plain);
    3745}
    3846
     
    7381      $xml_snippet=simplexml_load_string($data);
    7482      $json=json_encode($xml_snippet);
    75       echo ($json);
     83      echo (AESEncrypt($json));
    7684    } else {
    7785        $xmlobj=xmlrpc_decode($data);
     
    8088       
    8189        $json=json_encode($xmlobj);
    82         var_error_log($data);
    83         var_error_log($xmlobj);
    84         var_error_log($json);
    8590        if ($json=="") {
    8691          $json=$xmlobj;}
    87           //error_log($json);
    88           var_error_log($json);
    89         echo ($json);
     92        echo (AESEncrypt($json));
    9093    }
    9194 
Note: See TracChangeset for help on using the changeset viewer.