public function getLogPublicKey(string $publicKey = '') : EncryptionPublicKey
{
if (!$publicKey) {
$publicKey = $this->config['log-public-key'] ?? null;
if (!$publicKey) {
throw new SecurityAlert(\__('Encryption public key not configured.'));
}
}
return new EncryptionPublicKey(\Sodium\hex2bin($publicKey));
}