/** * {@inheritdoc} */ public function verify(JWKInterface $key, $input, $signature) { $this->checkKey($key); $pub = RSAKey::toPublic(new RSAKey($key)); if ($this->getSignatureMethod() === self::SIGNATURE_PSS) { return JoseRSA::verify($pub, $input, $signature, $this->getAlgorithm()); } else { return 1 === openssl_verify($input, $signature, $pub->toPEM(), $this->getAlgorithm()); } }