Add ExportedSession and improve RPC client handling.
This commit is contained in:
parent
0b51b47859
commit
42ba7013f7
6 changed files with 469 additions and 236 deletions
|
@ -1,25 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace Socialbox\Objects;
|
||||
namespace Socialbox\Objects;
|
||||
|
||||
class KeyPair
|
||||
{
|
||||
private string $publicKey;
|
||||
private string $privateKey;
|
||||
|
||||
public function __construct(string $publicKey, string $privateKey)
|
||||
class KeyPair
|
||||
{
|
||||
$this->publicKey = $publicKey;
|
||||
$this->privateKey = $privateKey;
|
||||
}
|
||||
private string $publicKey;
|
||||
private string $privateKey;
|
||||
|
||||
public function getPublicKey(): string
|
||||
{
|
||||
return $this->publicKey;
|
||||
}
|
||||
/**
|
||||
* Constructor method for initializing the class with a public key and private key.
|
||||
*
|
||||
* @param string $publicKey The public key to be used.
|
||||
* @param string $privateKey The private key to be used.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(string $publicKey, string $privateKey)
|
||||
{
|
||||
$this->publicKey = $publicKey;
|
||||
$this->privateKey = $privateKey;
|
||||
}
|
||||
|
||||
public function getPrivateKey(): string
|
||||
{
|
||||
return $this->privateKey;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Retrieves the public key associated with this instance.
|
||||
*
|
||||
* @return string The public key.
|
||||
*/
|
||||
public function getPublicKey(): string
|
||||
{
|
||||
return $this->publicKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the private key associated with the instance.
|
||||
*
|
||||
* @return string The private key as a string.
|
||||
*/
|
||||
public function getPrivateKey(): string
|
||||
{
|
||||
return $this->privateKey;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue