libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
qolmutility.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021 Carl Schwan <carlschwan@kde.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#pragma once
6
7#include <Quotient/util.h>
8
9#include <olm/error.h>
10
11struct OlmUtility;
12
13namespace Quotient {
14
15//! Allows you to make use of crytographic hashing via SHA-2 and
16//! verifying ed25519 signatures.
18{
19public:
21
22 //! Returns a sha256 of the supplied byte slice.
24
25 //! Convenience function that converts the UTF-8 message
26 //! to bytes and then calls `sha256Bytes()`, returning its output.
28
29 //! Verify a ed25519 signature.
30 //! \param key QByteArray The public part of the ed25519 key that signed the message.
31 //! \param message QByteArray The message that was signed.
32 //! \param signature QByteArray The signature of the message.
34 QByteArray signature) const;
35
37 const char* lastError() const;
38
39private:
41};
42} // namespace Quotient
#define QUOTIENT_API