QCoapPrivateKey Class
Die Klasse „QCoapPrivateKey“ bietet eine Schnittstelle zur Verwaltung von CoAP-Sicherheitsschlüsseln. Mehr...
| Header: | #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) |
Ausführliche Beschreibung
Ein QCoapPrivateKey verpackt einen privaten Schlüssel, der bei der sicheren Aushandlung von CoAP-Verbindungen verwendet wird. Er enthält die Informationen, die für die Authentifizierung mithilfe von „ pre-shared “-Schlüsseln und X.509-Zertifikaten erforderlich sind.
Dokumentation der Mitgliedsfunktionen
QCoapPrivateKey::QCoapPrivateKey()
Erstellt eine leere Instanz von QCoapPrivateKey.
QCoapPrivateKey::QCoapPrivateKey(const Qt::HANDLE &handle)
Erstellt 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())
Erstellt einen `QCoapPrivateKey` aus dem Byte-Array ` key ` unter Verwendung des angegebenen ` algorithm ` und der Kodierung ` format`.
Ist der Schlüssel verschlüsselt, wird passPhrase zum Entschlüsseln benötigt.
QCoapPrivateKey::QCoapPrivateKey(const QCoapPrivateKey &other)
Kopiert den Inhalt von „ other “ in diesen Schlüssel, sodass beide Schlüssel identisch sind.
[noexcept] QCoapPrivateKey::QCoapPrivateKey(QCoapPrivateKey &&other)
Erstellt ein `QCoapPrivateKey` per `move-construct`, sodass es auf dasselbe Objekt verweist wie zuvor ` other `.
[noexcept] QCoapPrivateKey::~QCoapPrivateKey()
Gibt alle von „ QCoapPrivateKey “ belegten 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
Gibt einen Zeiger auf das native Schlüssel-Handle zurück.
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 gegen „ other “ aus. Dieser Vorgang ist sehr schnell und schlägt niemals fehl.
QCoapPrivateKey &QCoapPrivateKey::operator=(const QCoapPrivateKey &other)
Kopiert den Inhalt von „ other “ in diesen Schlüssel, sodass beide Schlüssel identisch sind.
Gibt eine Referenz auf diesen Schlüssel „ QCoapPrivateKey “ zurück.
© 2026 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.