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

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