public function sign($value, $privateKey)
{
$result = openssl_sign($value, $signature, $privateKey, $this->getAlgorithm());
if (false === $result) {
throw new \RuntimeException('Failed to encrypt value. ' . implode("\n", $this->getSslErrors()));
}
return $signature;
}