Made message signing in Cryptography use SHA512 as the message content for... #1

Closed
netkas wants to merge 421 commits from master into dev
2 changed files with 16 additions and 0 deletions
Showing only changes of commit 4d01947092 - Show all commits

View file

@ -613,6 +613,21 @@
)->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.
*

View file

@ -624,6 +624,7 @@
try
{
$client = new SocialClient(self::getServerAddress(), $domain);
$client->authenticate();
}
catch (Exception $e)
{