summaryrefslogtreecommitdiffstats
path: root/src/crypto-lib/cryptography.h
blob: 17be18b0d9cde5e6ac6aadc0818a2bad1a40cb85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// Copyright (C) 2018 Pelagicore AG
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef CRYPTOGRAPHY_H
#define CRYPTOGRAPHY_H

#include <QtCore/QByteArray>
#include <QtCore/QString>
#include <QtAppManCommon/global.h>

QT_BEGIN_NAMESPACE_AM

namespace Cryptography {

QByteArray generateRandomBytes(int size);

void initialize();

void enableOpenSsl3LegacyProvider(); // needs to be called before any other crypto functions

QString errorString(qint64 osCryptoError, const char *errorDescription = nullptr);

}

QT_END_NAMESPACE_AM

#endif // CRYPTOGRAPHY_H