1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
5#ifndef QSSLKEY_OPENSSL_P_H
6#define QSSLKEY_OPENSSL_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of qsslcertificate.cpp. This header file may change from version to version
14// without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtNetwork/private/qtnetworkglobal_p.h>
20
21#include "qsslkey.h"
22#include "qssl_p.h"
23
24#include <memory>
25
26QT_BEGIN_NAMESPACE
27
28namespace QTlsPrivate {
29class TlsKey;
30}
31
32class QSslKeyPrivate
33{
34public:
35 QSslKeyPrivate();
36 ~QSslKeyPrivate();
37
38 using Cipher = QTlsPrivate::Cipher;
39
40 Q_NETWORK_EXPORT static QByteArray decrypt(Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv);
41 Q_NETWORK_EXPORT static QByteArray encrypt(Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv);
42
43 std::unique_ptr<QTlsPrivate::TlsKey> backend;
44 QAtomicInt ref;
45
46private:
47 Q_DISABLE_COPY_MOVE(QSslKeyPrivate)
48};
49
50QT_END_NAMESPACE
51
52#endif // QSSLKEY_OPENSSL_P_H
53

source code of qtbase/src/network/ssl/qsslkey_p.h