public function verifySignature($plaintext, $signature, $fingerprint)
    {
        if ($fingerprint === null || !isset($this->keys[$fingerprint])) {
            throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1304959763);
        }

        $verifyResult = openssl_verify($plaintext, $signature, $this->getPublicKey($fingerprint)->getKeyString());

        return $verifyResult === 1;
    }
public function verifySignature($plaintext, $signature, $fingerprint)
    {
        if ($fingerprint === null || !isset($this->keys[$fingerprint])) {
            throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1304959763);
        }

        $verifyResult = openssl_verify($plaintext, $signature, $this->getPublicKey($fingerprint)->getKeyString());

        return $verifyResult === 1;
    }
public function verifySignature ( $ plaintext , $ signature , $ fingerprint ) { if ( $ fingerprint === null || ! isset ( $ this -> keys [ $ fingerprint ] ) ) { throw new InvalidKeyPairIdException ( 'Invalid keypair fingerprint given' , 1304959763 ) ; } $ verifyResult = openssl_verify ( $ plaintext , $ signature , $ this -> getPublicKey ( $ fingerprint ) -> getKeyString ( ) ) ; return $ verifyResult === 1 ; }
Checks whether the given signature is valid for the given plaintext
with the public key identified by the given fingerprint

@param string $plaintext The plaintext to sign
@param string $signature The signature that should be verified
@param string $fingerprint The fingerprint to identify the public key (RSA public key fingerprint)
@return boolean true if the signature is correct for the given plaintext and public key
@throws InvalidKeyPairIdException
Checks whether the given signature is valid for the given plaintext with the public key identified by the given fingerprint