Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemon u7320 #3

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "comodojo/daemon",
"name": "pmarcelli/daemon",
"description": "Solid PHP daemon toolkit",
"license": "MIT",
"type": "library",
Expand Down Expand Up @@ -29,16 +29,15 @@
"Comodojo\\Daemon\\": "src/Comodojo/Daemon"
}
},
"minimum-stability": "dev",
"require": {
"php": ">=5.6.0",
"ext-posix": "*",
"ext-pcntl": "*",
"ext-shmop": "*",
"ext-sockets": "*",
"comodojo/foundation": "dev-master",
"comodojo/rpcserver": "dev-master",
"comodojo/rpcclient": "dev-master",
"pmarcelli/foundation": "dev-foundation_u7320",
"pmarcelli/rpcserver": "dev-rpcserver_u7320",
"pmarcelli/rpcclient": "dev-rpcclient_u7320",
"league/climate": "^3.0"
},
"require-dev": {
Expand Down
5 changes: 3 additions & 2 deletions src/Comodojo/Daemon/Socket/SocketTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use \Comodojo\RpcClient\Interfaces\Transport as TransportInterface;
use \Comodojo\Httprequest\Httprequest;
use \phpseclib\Crypt\AES;
use phpseclib3\Crypt\AES;
use \Psr\Log\LoggerInterface;
use \Comodojo\Exception\RpcException;
use \Comodojo\Exception\SocketException;
Expand Down Expand Up @@ -203,8 +203,9 @@ private function can($data, $key) {

if ( !empty($key) && is_string($key) ) {

$this->aes = new AES();
$this->aes = new AES('ecb');

//Only keys of sizes 16, 24 or 32 supported
$this->aes->setKey($key);

$return = 'comodojo_encrypted_request-'.base64_encode($this->aes->encrypt($data));
Expand Down