From 43071838174d393ec3e5b2cb96657f89d4c262a8 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 18 Jul 2020 04:32:37 +0200 Subject: [PATCH] Fix utilities test --- tests/src/utilities_test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/src/utilities_test.cpp b/tests/src/utilities_test.cpp index af4a92877..bf1f8c21f 100644 --- a/tests/src/utilities_test.cpp +++ b/tests/src/utilities_test.cpp @@ -20,6 +20,7 @@ #include +#include #include #include #include @@ -31,11 +32,11 @@ TEST(UtilitiesTest, HmacFunctions) { QString key("key"); QString data("The quick brown fox jumps over the lazy dog"); // Test Hmac Md5 - QByteArray result_hash_md5 = Utilities::HmacMd5(key.toLocal8Bit(), data.toLocal8Bit()).toHex(); + QString result_hash_md5 = Utilities::HmacMd5(key.toLocal8Bit(), data.toLocal8Bit()).toHex(); bool result_md5 = result_hash_md5 == QString("80070713463e7749b90c2dc24911e275"); EXPECT_TRUE(result_md5); // Test Hmac Sha256 - QByteArray result_hash_sha256 = Utilities::HmacSha256(key.toLocal8Bit(), data.toLocal8Bit()).toHex(); + QString result_hash_sha256 = Utilities::HmacSha256(key.toLocal8Bit(), data.toLocal8Bit()).toHex(); bool result_sha256 = result_hash_sha256 == QString("f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8"); EXPECT_TRUE(result_sha256); }