public function doVerify(string $expected, string $payload, Key $key) : bool { $key = openssl_get_publickey($key->getContent()); $this->validateKey($key); return openssl_verify($payload, $expected, $key, $this->getAlgorithm()) === 1; }