Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsslkey.h
Go to the documentation of this file.
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_H
6#define QSSLKEY_H
7
8#include <QtNetwork/qtnetworkglobal.h>
9#include <QtCore/qnamespace.h>
10#include <QtCore/qbytearray.h>
11#include <QtCore/qshareddata.h>
12#include <QtNetwork/qssl.h>
13
15
16
17#ifndef QT_NO_SSL
18
19class QIODevice;
20
21class QSslKeyPrivate;
22class Q_NETWORK_EXPORT QSslKey
23{
24public:
25 QSslKey();
29 const QByteArray &passPhrase = QByteArray());
33 const QByteArray &passPhrase = QByteArray());
35 QSslKey(const QSslKey &other);
36 QSslKey(QSslKey &&other) noexcept;
37 QSslKey &operator=(QSslKey &&other) noexcept;
38 QSslKey &operator=(const QSslKey &other);
39 ~QSslKey();
40
41 void swap(QSslKey &other) noexcept { d.swap(other.d); }
42
43 bool isNull() const;
44 void clear();
45
46 int length() const;
47 QSsl::KeyType type() const;
48 QSsl::KeyAlgorithm algorithm() const;
49
50 QByteArray toPem(const QByteArray &passPhrase = QByteArray()) const;
51 // ### Qt 7: drop passPhrase
52 QByteArray toDer(const QByteArray &passPhrase = QByteArray()) const;
53
54 Qt::HANDLE handle() const;
55
56 bool operator==(const QSslKey &key) const;
57 inline bool operator!=(const QSslKey &key) const { return !operator==(key); }
58
59private:
60 QExplicitlySharedDataPointer<QSslKeyPrivate> d;
61 friend class QTlsBackend;
62};
63
64Q_DECLARE_SHARED(QSslKey)
65
66#ifndef QT_NO_DEBUG_STREAM
67class QDebug;
68Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslKey &key);
69#endif
70
71#endif // QT_NO_SSL
72
74
75#endif
IOBluetoothDevice * device
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
\inmodule QtCore \reentrant
Definition qiodevice.h:34
The QSslKey class provides an interface for private and public keys.
Definition qsslkey.h:23
void swap(QSslKey &other) noexcept
Definition qsslkey.h:41
bool operator!=(const QSslKey &key) const
Returns true if this key is not equal to key other; otherwise returns false.
Definition qsslkey.h:57
QTlsBackend is a factory class, providing implementations for the QSsl classes.
b clear()
KeyType
Describes the two types of keys QSslKey supports.
Definition qssl.h:22
@ PrivateKey
Definition qssl.h:23
KeyAlgorithm
Describes the different key algorithms supported by QSslKey.
Definition qssl.h:34
EncodingFormat
Describes supported encoding formats for certificates and keys.
Definition qssl.h:28
@ Pem
Definition qssl.h:29
Combined button and popup list for selecting options.
void * HANDLE
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
GLuint64 GLenum void * handle
GLuint64 key
GLenum GLuint GLenum GLsizei length
GLenum type
GLint GLsizei GLsizei GLenum format
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220
Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslKey &key)
QSharedPointer< T > other(t)
[5]