QCoapPrivateKey Class
A classe QCoapPrivateKey oferece uma interface para gerenciar chaves de segurança CoAP. Saiba mais...
| Cabeçalho: | #include <QCoapPrivateKey> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Coap) target_link_libraries(mytarget PRIVATE Qt6::Coap) |
| qmake: | QT += coap |
Funções públicas
| 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) |
Descrição detalhada
Um QCoapPrivateKey encapsula uma chave privada usada para negociar conexões CoAP de forma segura. Ele contém as informações necessárias para a autenticação por meio de chaves d pre-shared o e certificados X.509.
Documentação das funções de membro
QCoapPrivateKey::QCoapPrivateKey()
Cria uma instância vazia de QCoapPrivateKey.
QCoapPrivateKey::QCoapPrivateKey(const Qt::HANDLE &handle)
Cria um objeto `QCoapPrivateKey` a partir de uma chave nativa handle.
QCoapPrivateKey::QCoapPrivateKey(const QByteArray &key, QSsl::KeyAlgorithm algorithm, QSsl::EncodingFormat format = QSsl::Pem, const QByteArray &passPhrase = QByteArray())
Cria uma instância de `QCoapPrivateKey` a partir da matriz de bytes ` key `, utilizando o ` algorithm ` e a codificação ` format` especificados.
Se a chave estiver criptografada, será necessário o passPhrase para descriptografá-la.
QCoapPrivateKey::QCoapPrivateKey(const QCoapPrivateKey &other)
Copia o conteúdo de ` other ` para esta chave, tornando as duas chaves idênticas.
[noexcept] QCoapPrivateKey::QCoapPrivateKey(QCoapPrivateKey &&other)
Move-construi um QCoapPrivateKey, fazendo com que ele aponte para o mesmo objeto para o qual um other o estava apontando.
[noexcept] QCoapPrivateKey::~QCoapPrivateKey()
Libera todos os recursos retidos por ` QCoapPrivateKey`.
QSsl::KeyAlgorithm QCoapPrivateKey::algorithm() const
Retorna o algoritmo da chave.
QSsl::EncodingFormat QCoapPrivateKey::encodingFormat() const
Retorna o formato de codificação da chave.
Qt::HANDLE QCoapPrivateKey::handle() const
Retorna um ponteiro para o identificador nativo da chave.
bool QCoapPrivateKey::isNull() const
Retorna ` true ` se a chave privada for nula; caso contrário, retorna ` false `.
QByteArray QCoapPrivateKey::key() const
Retorna a chave privada codificada.
QByteArray QCoapPrivateKey::passPhrase() const
Retorna a senha da chave.
[noexcept] void QCoapPrivateKey::swap(QCoapPrivateKey &other)
Troca essa chave privada por other. Essa operação é muito rápida e nunca falha.
QCoapPrivateKey &QCoapPrivateKey::operator=(const QCoapPrivateKey &other)
Copia o conteúdo de other para esta chave, tornando as duas chaves idênticas.
Retorna uma referência a este ` QCoapPrivateKey`.
© 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.