このページでは

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 の内容をこのキーにコピーし、2つのキーを同一の状態にします。

[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 の内容をこのキーにコピーし、2つのキーを同一にします。

この `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.