Emarref\Jwt\Algorithm\RsaSsaPkcs::verify PHP Method

verify() public method

public verify ( string $value, string $signature, string | resource $publicKey ) : boolean
$value string
$signature string
$publicKey string | resource
return boolean
    public function verify($value, $signature, $publicKey)
    {
        $result = openssl_verify($value, $signature, $publicKey, $this->getAlgorithm());
        if ($result === -1) {
            throw new \RuntimeException('Failed to verify signature. ' . implode("\n", $this->getSslErrors()));
        }
        return (bool) $result;
    }