Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qsslpresharedkeyauthenticator.cpp
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
6
7#include <QSharedData>
8
10
12QT_IMPL_METATYPE_EXTERN_TAGGED(QSslPreSharedKeyAuthenticator*, QSslPreSharedKeyAuthenticator_ptr)
13
14
18 : maximumIdentityLength(0),
19 maximumPreSharedKeyLength(0)
20{
21}
22
78{
79}
80
85{
86}
87
94 : d(authenticator.d)
95{
96}
97
103{
104 d = authenticator.d;
105 return *this;
106}
107
127{
128 return d->identityHint;
129}
130
141{
142 d->identity = identity;
143}
144
151{
152 return d->identity;
153}
154
155
166{
167 return d->maximumIdentityLength;
168}
169
170
181{
183}
184
191{
192 return d->preSharedKey;
193}
194
205{
207}
208
232bool QSslPreSharedKeyAuthenticator::isEqual(const QSslPreSharedKeyAuthenticator &other) const
233{
234 return ((d == other.d) ||
235 (d->identityHint == other.d->identityHint &&
236 d->identity == other.d->identity &&
237 d->maximumIdentityLength == other.d->maximumIdentityLength &&
238 d->preSharedKey == other.d->preSharedKey &&
239 d->maximumPreSharedKeyLength == other.d->maximumPreSharedKeyLength));
240}
241
\inmodule QtCore
Definition qbytearray.h:57
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
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.
Combined button and popup list for selecting options.
#define QT_IMPL_METATYPE_EXTERN_TAGGED(TYPE, TAG)
Definition qmetatype.h:1363
#define QT_IMPL_METATYPE_EXTERN(TYPE)
Definition qmetatype.h:1369
QSharedPointer< T > other(t)
[5]