Messagelib

urlhashing.h
1 /*
2  SPDX-FileCopyrightText: 2016-2021 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  static Q_REQUIRED_RESULT QString canonicalizeUrl(QUrl url);
23  static Q_REQUIRED_RESULT QStringList generatePathsToCheck(const QString &str, const QString &query);
24  static Q_REQUIRED_RESULT 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 }
33 
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.