public static function verify($message, $signature, PublicKey $rsaPublicKey)
    {
        $rsa = self::getRsa(RSA::SIGNATURE_PSS);

        $return = $rsa->loadKey($rsaPublicKey->getKey());
        if ($return === false) {
            throw new InvalidKeyException('Verification failed due to invalid key');
        }

        return $rsa->verify($message, $signature);
    }
public static function verify($message, $signature, PublicKey $rsaPublicKey)
    {
        $rsa = self::getRsa(RSA::SIGNATURE_PSS);

        $return = $rsa->loadKey($rsaPublicKey->getKey());
        if ($return === false) {
            throw new InvalidKeyException('Verification failed due to invalid key');
        }

        return $rsa->verify($message, $signature);
    }
public static function verify ( $ message , $ signature , PublicKey $ rsaPublicKey ) { $ rsa = self :: getRsa ( RSA :: SIGNATURE_PSS ) ; $ return = $ rsa -> loadKey ( $ rsaPublicKey -> getKey ( ) ) ; if ( $ return === false ) { throw new InvalidKeyException ( 'Verification failed due to invalid key' ) ; } return $ rsa -> verify ( $ message , $ signature ) ; }
Verify with RSASS-PSS + MGF1+SHA256

@param string $message
@param string $signature
@param PublicKey $rsaPublicKey
@return bool
Verify with RSASS - PSS + MGF1 + SHA256