Mercurial > trustbridge
comparison ui/sslhelp.cpp @ 469:f9b0014cff97
Fix return value of sha256 sum
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 23 Apr 2014 16:33:52 +0000 |
parents | 2e100d3e414a |
children | 6c4f526a4c5b |
comparison
equal
deleted
inserted
replaced
468:a53286e5b126 | 469:f9b0014cff97 |
---|---|
24 | 24 |
25 QByteArray sha256sum(const QByteArray& data) | 25 QByteArray sha256sum(const QByteArray& data) |
26 { | 26 { |
27 unsigned char output[32]; | 27 unsigned char output[32]; |
28 sha256((unsigned char *)data.constData(), (size_t)data.size(), output, 0); | 28 sha256((unsigned char *)data.constData(), (size_t)data.size(), output, 0); |
29 return QByteArray(data, 32); | 29 return QByteArray((const char *)output, 32); |
30 } | 30 } |
31 | 31 |
32 QByteArray rsaSignSHA256Hash(const QByteArray& hash, pk_context *pk) | 32 QByteArray rsaSignSHA256Hash(const QByteArray& hash, pk_context *pk) |
33 { | 33 { |
34 int ret = 0; | 34 int ret = 0; |