[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [messagelib] webengineviewer/src/checkphishingurl: Clean code
From: Montel Laurent <montel () kde ! org>
Date: 2016-12-09 13:01:26
Message-ID: E1cFKnm-0006lY-Ar () code ! kde ! org
[Download RAW message or body]
Git commit 913d64a2c48fb03fb96bd3f48835deeff4f34fc0 by Montel Laurent.
Committed on 09/12/2016 at 12:55.
Pushed by mlaurent into branch 'master'.
Clean code
M +0 -41 webengineviewer/src/checkphishingurl/urlhashing.cpp
M +0 -2 webengineviewer/src/checkphishingurl/urlhashing.h
https://commits.kde.org/messagelib/913d64a2c48fb03fb96bd3f48835deeff4f34fc0
diff --git a/webengineviewer/src/checkphishingurl/urlhashing.cpp \
b/webengineviewer/src/checkphishingurl/urlhashing.cpp index d27bf8c8..f783853a 100644
--- a/webengineviewer/src/checkphishingurl/urlhashing.cpp
+++ b/webengineviewer/src/checkphishingurl/urlhashing.cpp
@@ -151,44 +151,3 @@ QList<QByteArray> UrlHashing::hashList()
return lst;
}
-QByteArray UrlHashing::hashComputation()
-{
-#if 0
- Unit Test(in pseudo - C)
-
- // Example B1 from FIPS-180-2
- string input1 = "abc";
- string output1 = TruncatedSha256Prefix(input1, 32);
- int expected1[] = { 0xba, 0x78, 0x16, 0xbf };
- assert(output1.size() == 4); // 4 bytes == 32 bits
- for (int i = 0; i < output1.size(); i++) {
- assert(output1[i] == expected1[i]);
- }
-
- // Example B2 from FIPS-180-2
- string input2 = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
- string output2 = TruncatedSha256Prefix(input2, 48);
- int expected2[] = { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06 };
- assert(output2.size() == 6);
- for (int i = 0; i < output2.size(); i++) {
- assert(output2[i] == expected2[i]);
- }
-
- // Example B3 from FIPS-180-2
- string input3(1000000, 'a'); // 'a' repeated a million times
- string output3 = TruncatedSha256Prefix(input3, 96);
- int expected3[] = { 0xcd, 0xc7, 0x6e, 0x5c, 0x99, 0x14, 0xfb, 0x92,
- 0x81, 0xa1, 0xc7, 0xe2
- };
- assert(output3.size() == 12);
- for (int i = 0; i < output3.size(); i++) {
- assert(output3[i] == expected3[i]);
- }
-#endif
- return {};
-}
-
-QByteArray UrlHashing::hashPrefixComputation()
-{
- return {};
-}
diff --git a/webengineviewer/src/checkphishingurl/urlhashing.h \
b/webengineviewer/src/checkphishingurl/urlhashing.h index 36355ac2..25999c58 100644
--- a/webengineviewer/src/checkphishingurl/urlhashing.h
+++ b/webengineviewer/src/checkphishingurl/urlhashing.h
@@ -38,8 +38,6 @@ public:
static QStringList generateHostsToCheck(const QString &str);
QList<QByteArray> hashList();
- QByteArray hashComputation();
- QByteArray hashPrefixComputation();
private:
QUrl mUrl;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic