9#include "QXmppGlobal.h"
16#include <QCryptographicHash>
22namespace QXmpp::Private {
25 using Result = std::variant<std::vector<QXmppHash>, Cancelled,
QXmppError>;
27 HashingResult(Result result, std::unique_ptr<QIODevice> data)
28 : result(std::move(result)), data(std::move(data))
33 std::unique_ptr<QIODevice> data;
36struct HashVerificationResult {
37 struct NoStrongHashes { };
38 struct NotMatching { };
40 using Result = std::variant<NoStrongHashes, NotMatching, Verified, Cancelled, QXmppError>;
42 HashVerificationResult(Result result, std::unique_ptr<QIODevice> data)
43 : result(std::move(result)), data(std::move(data))
48 std::unique_ptr<QIODevice> data;
51using HashingResultPtr = std::shared_ptr<HashingResult>;
52using HashVerificationResultPtr = std::shared_ptr<HashVerificationResult>;
58QXMPP_EXPORT QFuture<HashingResultPtr> calculateHashes(std::unique_ptr<QIODevice> data, std::vector<HashAlgorithm> hashes);
59QFuture<HashVerificationResultPtr> verifyHashes(std::unique_ptr<QIODevice> data, std::vector<QXmppHash> hashes);
Definition: QXmppHash.h:37
HashAlgorithm
Definition: QXmppHash.h:17
Definition: QXmppError.h:17