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
qsslpresharedkeyauthenticator.h
Go to the documentation of this file.
1// Copyright (C) 2014 Governikus GmbH & Co. KG.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSSLPRESHAREDKEYAUTHENTICATOR_H
5#define QSSLPRESHAREDKEYAUTHENTICATOR_H
6
7#include <QtNetwork/qtnetworkglobal.h>
8#include <QtCore/QString>
9#include <QtCore/QSharedDataPointer>
10#include <QtCore/QMetaType>
11
13
15
18{
19 Q_GADGET_EXPORT(Q_NETWORK_EXPORT)
20public:
21 Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator();
22 Q_NETWORK_EXPORT ~QSslPreSharedKeyAuthenticator();
23 Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator(const QSslPreSharedKeyAuthenticator &authenticator);
24 Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator &operator=(const QSslPreSharedKeyAuthenticator &authenticator);
25
27
29
30 Q_NETWORK_EXPORT QByteArray identityHint() const;
31
32 Q_NETWORK_EXPORT void setIdentity(const QByteArray &identity);
33 Q_NETWORK_EXPORT QByteArray identity() const;
34 Q_NETWORK_EXPORT int maximumIdentityLength() const;
35
36 Q_NETWORK_EXPORT void setPreSharedKey(const QByteArray &preSharedKey);
37 Q_NETWORK_EXPORT QByteArray preSharedKey() const;
38 Q_NETWORK_EXPORT int maximumPreSharedKeyLength() const;
39
40private:
41 Q_NETWORK_EXPORT bool isEqual(const QSslPreSharedKeyAuthenticator &other) const;
42
43 friend class QTlsBackend;
44
46 { return lhs.isEqual(rhs); }
48 { return !lhs.isEqual(rhs); }
49
50 QSharedDataPointer<QSslPreSharedKeyAuthenticatorPrivate> d;
51};
52
53
54Q_DECLARE_SHARED(QSslPreSharedKeyAuthenticator)
55
57
59QT_DECL_METATYPE_EXTERN_TAGGED(QSslPreSharedKeyAuthenticator*, QSslPreSharedKeyAuthenticator_ptr, Q_NETWORK_EXPORT)
60
61#endif // QSSLPRESHAREDKEYAUTHENTICATOR_H
\inmodule QtCore
Definition qbytearray.h:57
void swap(QSharedDataPointer &other) noexcept
Swap this instance's shared data pointer with the shared data pointer in other.
Definition qshareddata.h:96
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
friend bool operator!=(const QSslPreSharedKeyAuthenticator &lhs, const QSslPreSharedKeyAuthenticator &rhs)
void swap(QSslPreSharedKeyAuthenticator &other) noexcept
Swaps the QSslPreSharedKeyAuthenticator object authenticator with this object.
QSslPreSharedKeyAuthenticator & operator=(QSslPreSharedKeyAuthenticator &&other) noexcept
Move-assigns the QSslPreSharedKeyAuthenticator object authenticator to this object,...
Q_NETWORK_EXPORT void setIdentity(const QByteArray &identity)
Sets the PSK client identity (to be advised to the server) to identity.
Q_NETWORK_EXPORT QByteArray identityHint() const
Returns the PSK identity hint as provided by the server.
Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator()
Constructs a default QSslPreSharedKeyAuthenticator object.
Q_NETWORK_EXPORT QByteArray preSharedKey() const
Returns the pre shared key.
Q_NETWORK_EXPORT int maximumIdentityLength() const
Returns the maximum length, in bytes, of the PSK client identity.
Q_NETWORK_EXPORT ~QSslPreSharedKeyAuthenticator()
Destroys the QSslPreSharedKeyAuthenticator object.
Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator & operator=(const QSslPreSharedKeyAuthenticator &authenticator)
Assigns the QSslPreSharedKeyAuthenticator object authenticator to this object, and returns a referenc...
Q_NETWORK_EXPORT QByteArray identity() const
Returns the PSK client identity.
Q_NETWORK_EXPORT void setPreSharedKey(const QByteArray &preSharedKey)
Sets the pre shared key to preSharedKey.
Q_NETWORK_EXPORT int maximumPreSharedKeyLength() const
Returns the maximum length, in bytes, of the pre shared key.
friend bool operator==(const QSslPreSharedKeyAuthenticator &lhs, const QSslPreSharedKeyAuthenticator &rhs)
QTlsBackend is a factory class, providing implementations for the QSsl classes.
Combined button and popup list for selecting options.
#define QT_DECL_METATYPE_EXTERN(TYPE, EXPORT)
Definition qmetatype.h:1388
#define QT_DECL_METATYPE_EXTERN_TAGGED(TYPE, TAG, EXPORT)
Definition qmetatype.h:1376
#define QT_REQUIRE_CONFIG(feature)
#define Q_GADGET_EXPORT(...)
QSharedPointer< T > other(t)
[5]