QCoapPrivateKey Class

Die Klasse QCoapPrivateKey bietet eine Schnittstelle zur Verwaltung von CoAP-Sicherheitsschlüsseln. Mehr...

Kopfzeile: #include <QCoapPrivateKey>
CMake: find_package(Qt6 REQUIRED COMPONENTS Coap)
target_link_libraries(mytarget PRIVATE Qt6::Coap)
qmake: QT += coap

Öffentliche Funktionen

QCoapPrivateKey()
QCoapPrivateKey(const Qt::HANDLE &handle)
QCoapPrivateKey(const QByteArray &key, QSsl::KeyAlgorithm algorithm, QSsl::EncodingFormat format = QSsl::Pem, const QByteArray &passPhrase = QByteArray())
QCoapPrivateKey(const QCoapPrivateKey &other)
QCoapPrivateKey(QCoapPrivateKey &&other)
~QCoapPrivateKey()
QSsl::KeyAlgorithm algorithm() const
QSsl::EncodingFormat encodingFormat() const
Qt::HANDLE handle() const
bool isNull() const
QByteArray key() const
QByteArray passPhrase() const
void swap(QCoapPrivateKey &other)
QCoapPrivateKey &operator=(const QCoapPrivateKey &other)

Detaillierte Beschreibung

Ein QCoapPrivateKey verpackt einen privaten Schlüssel, der für die sichere Aushandlung von CoAP-Verbindungen verwendet wird. Er enthält die Informationen, die für die Authentifizierung mit pre-shared Schlüsseln und X.509 Zertifikaten benötigt werden.

Dokumentation der Mitgliedsfunktionen

QCoapPrivateKey::QCoapPrivateKey()

Konstruiert eine leere Instanz von QCoapPrivateKey.

QCoapPrivateKey::QCoapPrivateKey(const Qt::HANDLE &handle)

Konstruiert einen QCoapPrivateKey aus einem nativen Schlüssel handle.

QCoapPrivateKey::QCoapPrivateKey(const QByteArray &key, QSsl::KeyAlgorithm algorithm, QSsl::EncodingFormat format = QSsl::Pem, const QByteArray &passPhrase = QByteArray())

Konstruiert einen QCoapPrivateKey aus dem Byte-Array key unter Verwendung des angegebenen algorithm und der Kodierung format.

Wenn der Schlüssel verschlüsselt ist, ist passPhrase erforderlich, um ihn zu entschlüsseln.

QCoapPrivateKey::QCoapPrivateKey(const QCoapPrivateKey &other)

Kopiert den Inhalt von other in diesen Schlüssel, wodurch die beiden Schlüssel identisch werden.

[noexcept] QCoapPrivateKey::QCoapPrivateKey(QCoapPrivateKey &&other)

Move-konstruiert einen QCoapPrivateKey, der auf das gleiche Objekt zeigt, auf das other gezeigt hat.

[noexcept] QCoapPrivateKey::~QCoapPrivateKey()

Gibt alle von QCoapPrivateKey gehaltenen Ressourcen frei.

QSsl::KeyAlgorithm QCoapPrivateKey::algorithm() const

Gibt den Schlüsselalgorithmus zurück.

QSsl::EncodingFormat QCoapPrivateKey::encodingFormat() const

Gibt das Kodierungsformat des Schlüssels zurück.

Qt::HANDLE QCoapPrivateKey::handle() const

Liefert einen Zeiger auf das Handle des eigenen Schlüssels.

bool QCoapPrivateKey::isNull() const

Gibt true zurück, wenn der private Schlüssel null ist, andernfalls false.

QByteArray QCoapPrivateKey::key() const

Gibt den verschlüsselten privaten Schlüssel zurück.

QByteArray QCoapPrivateKey::passPhrase() const

Gibt die Passphrase für den Schlüssel zurück.

[noexcept] void QCoapPrivateKey::swap(QCoapPrivateKey &other)

Tauscht diesen privaten Schlüssel mit other aus. Dieser Vorgang ist sehr schnell und schlägt nie fehl.

QCoapPrivateKey &QCoapPrivateKey::operator=(const QCoapPrivateKey &other)

Kopiert den Inhalt von other in diesen Schlüssel, wodurch die beiden Schlüssel identisch werden.

Gibt einen Verweis auf diesen QCoapPrivateKey zurück.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.