Messagelib

urlhashing.h
1 /*
2  SPDX-FileCopyrightText: 2016-2022 Laurent Montel <[email protected]>
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 
13 namespace WebEngineViewer
14 {
15 // https://developers.google.com/safe-browsing/v4/urls-hashing
16 class WEBENGINEVIEWER_TESTS_EXPORT UrlHashing
17 {
18 public:
19  explicit UrlHashing(const QUrl &url);
20  ~UrlHashing();
21 
22  Q_REQUIRED_RESULT static QString canonicalizeUrl(QUrl url);
23  Q_REQUIRED_RESULT static QStringList generatePathsToCheck(const QString &str, const QString &query);
24  Q_REQUIRED_RESULT static QStringList generateHostsToCheck(const QString &str);
25 
26  /*long hash, short hash*/
27  Q_REQUIRED_RESULT QHash<QByteArray, QByteArray> hashList() const;
28 
29 private:
30  const QUrl mUrl;
31 };
32 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue May 24 2022 04:08:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.