Messagelib

urlhashing.h
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "webengineviewer_private_export.h"
10#include <QString>
11#include <QUrl>
12
13namespace WebEngineViewer
14{
15// https://developers.google.com/safe-browsing/v4/urls-hashing
16class WEBENGINEVIEWER_TESTS_EXPORT UrlHashing
17{
18public:
19 explicit UrlHashing(const QUrl &url);
20 ~UrlHashing();
21
22 [[nodiscard]] static QString canonicalizeUrl(QUrl url);
23 [[nodiscard]] static QStringList generatePathsToCheck(const QString &str, const QString &query);
24 [[nodiscard]] static QStringList generateHostsToCheck(const QString &str);
25
26 /*long hash, short hash*/
27 [[nodiscard]] QHash<QByteArray, QByteArray> hashList() const;
28
29private:
30 const QUrl mUrl;
31};
32}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.