public function verifyStream($stream, $signature, $publicKey)
    {
        try {
            $virgilSourceStream = new VirgilStreamDataSource($stream);

            return (new CryptoVirgilStreamSigner($this->hashAlgorithm))->verify(
                $virgilSourceStream,
                $signature,
                $publicKey
            );
        } catch (Exception $exception) {
            throw new ContentVerificationException($exception->getMessage(), $exception->getCode());
        }
    }