QCoapPrivateKey Class
QCoapPrivateKey 클래스는 CoAP 보안 키를 관리하기 위한 인터페이스를 제공합니다. 더 보기...
| 헤더: | #include <QCoapPrivateKey> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Coap) target_link_libraries(mytarget PRIVATE Qt6::Coap) |
| qmake: | QT += coap |
공개 함수
| 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) |
상세 설명
QCoapPrivateKey는 CoAP 연결 협상 시 사용되는 개인 키를 안전하게 패키징합니다. 이 클래스는 pre-shared 키 및 X.509 인증서를 사용한 인증에 필요한 정보를 보관합니다.
멤버 함수 설명
QCoapPrivateKey::QCoapPrivateKey()
QCoapPrivateKey의 빈 인스턴스를 생성합니다.
QCoapPrivateKey::QCoapPrivateKey(const Qt::HANDLE &handle)
네이티브 키 handle 를 사용하여 QCoapPrivateKey를 생성합니다.
QCoapPrivateKey::QCoapPrivateKey(const QByteArray &key, QSsl::KeyAlgorithm algorithm, QSsl::EncodingFormat format = QSsl::Pem, const QByteArray &passPhrase = QByteArray())
지정된 algorithm 및 인코딩 format 을 사용하여 바이트 배열 key 로부터 QCoapPrivateKey를 생성합니다.
키가 암호화된 경우, 이를 복호화하려면 passPhrase 가 필요합니다.
QCoapPrivateKey::QCoapPrivateKey(const QCoapPrivateKey &other)
other 의 내용을 이 키로 복사하여 두 키를 동일하게 만듭니다.
[noexcept] QCoapPrivateKey::QCoapPrivateKey(QCoapPrivateKey &&other)
QCoapPrivateKey를 이동 생성하여, 이 객체가 other 이 가리키던 것과 동일한 객체를 가리키도록 만듭니다.
[noexcept] QCoapPrivateKey::~QCoapPrivateKey()
QCoapPrivateKey 가 점유하고 있는 모든 리소스를 해제합니다.
QSsl::KeyAlgorithm QCoapPrivateKey::algorithm() const
키 알고리즘을 반환합니다.
QSsl::EncodingFormat QCoapPrivateKey::encodingFormat() const
키의 인코딩 형식을 반환합니다.
Qt::HANDLE QCoapPrivateKey::handle() const
네이티브 키 핸들에 대한 포인터를 반환합니다.
bool QCoapPrivateKey::isNull() const
개인 키가 null인 경우 ` true `를 반환하고, 그렇지 않은 경우 ` false `를 반환합니다.
QByteArray QCoapPrivateKey::key() const
인코딩된 개인 키를 반환합니다.
QByteArray QCoapPrivateKey::passPhrase() const
키에 대한 암호를 반환합니다.
[noexcept] void QCoapPrivateKey::swap(QCoapPrivateKey &other)
이 개인 키를 other 로 교체합니다. 이 작업은 매우 빠르며 절대 실패하지 않습니다.
QCoapPrivateKey &QCoapPrivateKey::operator=(const QCoapPrivateKey &other)
other 의 내용을 이 키로 복사하여 두 키를 동일하게 만듭니다.
이 ` 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.