comparison ui/tests/createcertlisttest.cpp @ 471:dd54c02fc28a

Hex != base64
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 23 Apr 2014 16:34:46 +0000
parents a166d740cb5a
children bcae22d57e67
comparison
equal deleted inserted replaced
470:a166d740cb5a 471:dd54c02fc28a
54 54
55 void CreateCertListTest::testSha256Sum() 55 void CreateCertListTest::testSha256Sum()
56 { 56 {
57 QByteArray input = "foo\n"; 57 QByteArray input = "foo\n";
58 QByteArray output = sha256sum(input); 58 QByteArray output = sha256sum(input);
59 QVERIFY(output.toBase64() == QByteArray("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c")); 59 QVERIFY(output == QByteArray::fromHex("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"));
60 } 60 }
61 61
62 void CreateCertListTest::testSignature() 62 void CreateCertListTest::testSignature()
63 { 63 {
64 QByteArray hash = QByteArray::fromBase64("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"); 64 QByteArray hash = QByteArray::fromHex("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c");
65 65
66 QTemporaryFile keyFile; 66 QTemporaryFile keyFile;
67 QFile keyRes(":/testkey-priv.pem"); 67 QFile keyRes(":/testkey-priv.pem");
68 keyRes.open(QIODevice::ReadOnly); 68 keyRes.open(QIODevice::ReadOnly);
69 keyFile.open(); 69 keyFile.open();

http://wald.intevation.org/projects/trustbridge/