Skip to content

Commit

Permalink
Fix missing partial crypto functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
seba-aln committed Oct 26, 2023
1 parent ed009ab commit caab27a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/PubNub/PubNub.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class PubNub implements LoggerAwareInterface
/** @var int $nextSequence */
protected $nextSequence = 0;

protected ?CryptoModule $cryptoModule = null;

/**
* PNConfiguration constructor.
*
Expand Down Expand Up @@ -557,4 +559,18 @@ public function setToken($token)
{
return $this->tokenManager->setToken($token);
}

public function getCrypto(): CryptoModule
{
if ($this->cryptoModule) {
return $this->cryptoModule;
} else {
return $this->configuration->getCrypto();
}
}

public function setCrypto(CryptoModule $cryptoModule)
{
$this->cryptoModule = $cryptoModule;
}
}

0 comments on commit caab27a

Please sign in to comment.