Made message signing in Cryptography use SHA512 as the message content for... #1
2 changed files with 16 additions and 0 deletions
|
@ -613,6 +613,21 @@
|
||||||
)->getResponse()->getResult();
|
)->getResponse()->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authenticates the user by sending a remote procedure call request.
|
||||||
|
* Only applicable for server to server communication, this is the first method to call
|
||||||
|
* after connecting to the server.
|
||||||
|
*
|
||||||
|
* @return true Returns true if the authentication is successful.
|
||||||
|
* @throws RpcException Thrown if the RPC request fails.
|
||||||
|
*/
|
||||||
|
public function authenticate(): true
|
||||||
|
{
|
||||||
|
return (bool)$this->sendRequest(
|
||||||
|
new RpcRequest(StandardMethods::AUTHENTICATE->value, Utilities::randomCrc32())
|
||||||
|
)->getResponse()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves a peer by its address or a PeerAddress instance through a remote procedure call.
|
* Resolves a peer by its address or a PeerAddress instance through a remote procedure call.
|
||||||
*
|
*
|
||||||
|
|
|
@ -624,6 +624,7 @@
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$client = new SocialClient(self::getServerAddress(), $domain);
|
$client = new SocialClient(self::getServerAddress(), $domain);
|
||||||
|
$client->authenticate();
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue