summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-16 07:56:07 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-16 07:56:07 (GMT)
commitbfb84a6527ed10324a8d50f5c921e7737dbc134e (patch)
tree3bdd1558a52571203f43aa79e70df3f37a16188e
parent30ac86ea47b3060ee0bc5669fcd934ee0c5bf4fb (diff)
Create hash
-rw-r--r--webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp7
-rw-r--r--webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h2
-rw-r--r--webengineviewer/src/checkphishingurl/tests/CMakeLists.txt1
3 files changed, 4 insertions, 6 deletions
diff --git a/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp b/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp
index d48e754..7532ccd 100644
--- a/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp
+++ b/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp
@@ -18,7 +18,7 @@
*/
#include "checkphishingurlfromlocaldatabasejob.h"
-
+#include <qcryptographichash.h>
using namespace WebEngineViewer;
CheckPhishingUrlFromLocalDataBaseJob::CheckPhishingUrlFromLocalDataBaseJob(QObject *parent)
@@ -52,8 +52,7 @@ bool CheckPhishingUrlFromLocalDataBaseJob::canStart() const
return mUrl.isValid();
}
-QString CheckPhishingUrlFromLocalDataBaseJob::createHash()
+QByteArray CheckPhishingUrlFromLocalDataBaseJob::createHash()
{
- //TODO
- return {};
+ return QCryptographicHash::hash(QByteArray() /*TODO use url*/, QCryptographicHash::Sha256);
}
diff --git a/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h b/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h
index 060102a..4a3f631 100644
--- a/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h
+++ b/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h
@@ -45,7 +45,7 @@ public:
void start();
bool canStart() const;
- QString createHash();
+ QByteArray createHash();
Q_SIGNALS:
void finished(WebEngineViewer::CheckPhishingUrlFromLocalDataBaseJob::UrlStatus status);
diff --git a/webengineviewer/src/checkphishingurl/tests/CMakeLists.txt b/webengineviewer/src/checkphishingurl/tests/CMakeLists.txt
index 22963ba..7183cdd 100644
--- a/webengineviewer/src/checkphishingurl/tests/CMakeLists.txt
+++ b/webengineviewer/src/checkphishingurl/tests/CMakeLists.txt
@@ -3,7 +3,6 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include(ECMAddTests)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-
set(checkphishingurlgui_SRCS checkphishingurlgui.cpp)
add_executable(checkphishingurlgui ${checkphishingurlgui_SRCS})
target_link_libraries(checkphishingurlgui