[PATCH 3 of 3] Hex != base64

Wald Commits scm-commit at wald.intevation.org
Wed Apr 23 18:35:37 CEST 2014


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1398270886 0
# Node ID dd54c02fc28ad4ee39ad4b144dee0fc16335fc46
# Parent  a166d740cb5a9ebb3a66877915f788f54e8f131d
Hex != base64

diff -r a166d740cb5a -r dd54c02fc28a ui/tests/createcertlisttest.cpp
--- a/ui/tests/createcertlisttest.cpp	Wed Apr 23 16:34:10 2014 +0000
+++ b/ui/tests/createcertlisttest.cpp	Wed Apr 23 16:34:46 2014 +0000
@@ -56,12 +56,12 @@
 {
     QByteArray input = "foo\n";
     QByteArray output = sha256sum(input);
-    QVERIFY(output.toBase64() == QByteArray("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"));
+    QVERIFY(output == QByteArray::fromHex("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"));
 }
 
 void CreateCertListTest::testSignature()
 {
-    QByteArray hash = QByteArray::fromBase64("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c");
+    QByteArray hash = QByteArray::fromHex("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c");
 
     QTemporaryFile keyFile;
     QFile keyRes(":/testkey-priv.pem");


More information about the Trustbridge-commits mailing list