Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Geyer <debfx@fobos.de>2010-09-19 22:13:23 +0400
committerFelix Geyer <debfx@fobos.de>2010-09-19 22:13:23 +0400
commitb639c43b2484a0aebf0065fd6f525eeaec18d67c (patch)
tree6a8d448adbde93106de605c127c4c6a65ab1c712 /tests/TestCryptoHash.cpp
parent24158bb032df1ceda1c6cdd87e5d4d29cce4681a (diff)
Remove unneeded toHex() calls.
Diffstat (limited to 'tests/TestCryptoHash.cpp')
-rw-r--r--tests/TestCryptoHash.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/TestCryptoHash.cpp b/tests/TestCryptoHash.cpp
index e81d82313..11f2ccca5 100644
--- a/tests/TestCryptoHash.cpp
+++ b/tests/TestCryptoHash.cpp
@@ -40,18 +40,18 @@ void TestCryptoHash::test()
QVERIFY(Crypto::selfTest());
CryptoHash cryptoHash1(CryptoHash::Sha256);
- QCOMPARE(QString(cryptoHash1.result().toHex()),
- QString("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"));
+ QCOMPARE(cryptoHash1.result(),
+ QByteArray::fromHex("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"));
QByteArray source2 = QString("KeePassX").toAscii();
- QString result2 = CryptoHash::hash(source2, CryptoHash::Sha256).toHex();
- QCOMPARE(result2, QString("0b56e5f65263e747af4a833bd7dd7ad26a64d7a4de7c68e52364893dca0766b4"));
+ QByteArray result2 = CryptoHash::hash(source2, CryptoHash::Sha256);
+ QCOMPARE(result2, QByteArray::fromHex("0b56e5f65263e747af4a833bd7dd7ad26a64d7a4de7c68e52364893dca0766b4"));
CryptoHash cryptoHash3(CryptoHash::Sha256);
cryptoHash3.addData(QString("KeePa").toAscii());
cryptoHash3.addData(QString("ssX").toAscii());
- QCOMPARE(QString(cryptoHash3.result().toHex()),
- QString("0b56e5f65263e747af4a833bd7dd7ad26a64d7a4de7c68e52364893dca0766b4"));
+ QCOMPARE(cryptoHash3.result(),
+ QByteArray::fromHex("0b56e5f65263e747af4a833bd7dd7ad26a64d7a4de7c68e52364893dca0766b4"));
}
QTEST_MAIN(TestCryptoHash);