diff ui/sslhelp.cpp @ 1377:c8a6a3e6bdeb

(issue178) Show checksums after installer creation
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 15 Jan 2015 11:22:47 +0100
parents 6c4f526a4c5b
children f3e2df6b49ba
line wrap: on
line diff
--- a/ui/sslhelp.cpp	Thu Dec 04 14:32:16 2014 +0100
+++ b/ui/sslhelp.cpp	Thu Jan 15 11:22:47 2015 +0100
@@ -7,6 +7,7 @@
  */
 #include "sslhelp.h"
 #include <polarssl/sha256.h>
+#include <polarssl/sha1.h>
 #include <polarssl/pk.h>
 #include <polarssl/entropy.h>
 #include <polarssl/ctr_drbg.h>
@@ -29,6 +30,13 @@
     return QByteArray((const char *)output, 32);
 }
 
+QByteArray sha1sum(const QByteArray& data)
+{
+    unsigned char output[20];
+    sha1((unsigned char *)data.constData(), (size_t)data.size(), output);
+    return QByteArray((const char *)output, 20);
+}
+
 QByteArray rsaSignSHA256Hash(const QByteArray& hash, pk_context *pk)
 {
     int ret = 0;

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