From ff4de8e8f74a641d3cc31303f3b172ea7b1be17f Mon Sep 17 00:00:00 2001 From: xiphon Date: Wed, 10 Jun 2020 12:26:52 +0000 Subject: updater: use monero tools::sha256sum --- src/qt/updater.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/qt/updater.cpp b/src/qt/updater.cpp index 17d6eddb..b8afc761 100644 --- a/src/qt/updater.cpp +++ b/src/qt/updater.cpp @@ -28,6 +28,8 @@ #include "updater.h" +#include + #include #include "network.h" @@ -111,10 +113,9 @@ QPair Updater::verifySignaturesAndHashSum( QByteArray Updater::getHash(const void *data, size_t size) const { - openpgp::hash hasher(openpgp::hash::algorithm::sha256); - hasher << epee::span(reinterpret_cast(data), size); - const std::vector hash = hasher.finish(); - return QByteArray(reinterpret_cast(&hash[0]), hash.size()); + QByteArray hash(sizeof(crypto::hash), 0); + tools::sha256sum(static_cast(data), size, *reinterpret_cast(hash.data())); + return hash; } QByteArray Updater::parseShasumOutput(const QString &message, const QString &filename) const -- cgit v1.2.3