I have the following code in PHP:
$params = json_decode(trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $api_secret, base64_decode($enc_request), MCRYPT_MODE_ECB)));
Where the result is an array and not a string.
My data I need to send is these:
Dados dados = new Dados ();
dados.Controller = "Get";
dados.Action = "FindIdUsuario_get";
dados.Email = "[email protected]";
dados.Pass = "teste";
How do I encrypt these classes using Rijndael to send to my url?
UPDATE
Here is the encryption code I use in php:
$request_params = array();
$request_params['controller'] = 'Get';
$request_params['action'] = 'FindIdUsuario_get';
$request_params['email'] = '[email protected]';
$request_params['pass'] = 'teste';
echo base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $public_key, json_encode($request_params), MCRYPT_MODE_ECB));