Made message signing in Cryptography use SHA512 as the message content for... #1
1 changed files with 4 additions and 2 deletions
|
@ -6,6 +6,8 @@
|
||||||
use Socialbox\Abstracts\Method;
|
use Socialbox\Abstracts\Method;
|
||||||
use Socialbox\Enums\StandardError;
|
use Socialbox\Enums\StandardError;
|
||||||
use Socialbox\Exceptions\DatabaseOperationException;
|
use Socialbox\Exceptions\DatabaseOperationException;
|
||||||
|
use Socialbox\Exceptions\Standard\InvalidRpcArgumentException;
|
||||||
|
use Socialbox\Exceptions\Standard\MissingRpcArgumentException;
|
||||||
use Socialbox\Exceptions\Standard\StandardException;
|
use Socialbox\Exceptions\Standard\StandardException;
|
||||||
use Socialbox\Interfaces\SerializableInterface;
|
use Socialbox\Interfaces\SerializableInterface;
|
||||||
use Socialbox\Managers\ContactManager;
|
use Socialbox\Managers\ContactManager;
|
||||||
|
@ -24,7 +26,7 @@
|
||||||
{
|
{
|
||||||
if(!$rpcRequest->containsParameter('peer'))
|
if(!$rpcRequest->containsParameter('peer'))
|
||||||
{
|
{
|
||||||
return $rpcRequest->produceError(StandardError::RPC_INVALID_ARGUMENTS, 'Missing required peer parameter');
|
throw new MissingRpcArgumentException('peer');
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -33,7 +35,7 @@
|
||||||
}
|
}
|
||||||
catch(InvalidArgumentException $e)
|
catch(InvalidArgumentException $e)
|
||||||
{
|
{
|
||||||
throw new StandardException('Invalid peer address', StandardError::RPC_INVALID_ARGUMENTS, $e);
|
throw new InvalidRpcArgumentException('peer', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
Loading…
Add table
Reference in a new issue