QSslDiffieHellmanParameters Class
QSslDiffieHellmanParameters クラスは、サーバー用の Diffie-Hellman パラメーター用のインターフェースを提供します。詳細...
ヘッダ | #include <QSslDiffieHellmanParameters> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
qmake: | QT += network |
- 継承メンバを含む全メンバのリスト
- QSslDiffieHellmanParameters はNetwork Programming APIおよびImplicitly Shared Classes に含まれています。
注意:このクラスの関数はすべてリエントラントです。
パブリック型
enum | Error { NoError, InvalidInputDataError, UnsafeParametersError } |
パブリック関数
QSslDiffieHellmanParameters() | |
QSslDiffieHellmanParameters(const QSslDiffieHellmanParameters &other) | |
QSslDiffieHellmanParameters(QSslDiffieHellmanParameters &&other) | |
~QSslDiffieHellmanParameters() | |
QSslDiffieHellmanParameters::Error | error() const |
QString | errorString() const |
bool | isEmpty() const |
bool | isValid() const |
void | swap(QSslDiffieHellmanParameters &other) |
QSslDiffieHellmanParameters & | operator=(QSslDiffieHellmanParameters &&other) |
QSslDiffieHellmanParameters & | operator=(const QSslDiffieHellmanParameters &other) |
静的パブリックメンバ
QSslDiffieHellmanParameters | defaultParameters() |
QSslDiffieHellmanParameters | fromEncoded(QIODevice *device, QSsl::EncodingFormat encoding = QSsl::Pem) |
QSslDiffieHellmanParameters | fromEncoded(const QByteArray &encoded, QSsl::EncodingFormat encoding = QSsl::Pem) |
関連する非メンバー
size_t | qHash(const QSslDiffieHellmanParameters &key, size_t seed = 0) |
bool | operator!=(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs) |
QDebug | operator<<(QDebug debug, const QSslDiffieHellmanParameters &dhparam) |
bool | operator==(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs) |
詳細説明
QSslDiffieHellmanParameters は、QSslSocket に基づいて Diffie-Hellman パラメータをサーバーに設定するためのインターフェースを提供します。
QSslSocket 、QSslCipher 、QSslConfigurationも参照 。
メンバー型ドキュメント
enum QSslDiffieHellmanParameters::Error
QSslDiffieHellmanParameters エラーを記述する。
定数 | 値 | 説明 |
---|---|---|
QSslDiffieHellmanParameters::NoError | 0 | エラーは発生しませんでした。 |
QSslDiffieHellmanParameters::InvalidInputDataError | 1 | 与えられた入力データは、QSslDiffieHellmanParameters オブジェクトを構築するために使用できなかった。 |
QSslDiffieHellmanParameters::UnsafeParametersError | 2 | Diffie-Hellman パラメータは安全ではないので使用しないでください。 |
メンバー関数ドキュメント
QSslDiffieHellmanParameters::QSslDiffieHellmanParameters()
空の QSslDiffieHellmanParameters インスタンスを構築する。
空の QSslDiffieHellmanParameters インスタンスがQSslConfiguration オブジェクトに設定された場合、 Diffie-Hellman ネゴシエーションは無効になります。
isValid() およびQSslConfigurationも参照 。
QSslDiffieHellmanParameters::QSslDiffieHellmanParameters(const QSslDiffieHellmanParameters &other)
other の同一コピーを作成する。
[noexcept]
QSslDiffieHellmanParameters::QSslDiffieHellmanParameters(QSslDiffieHellmanParameters &&other)
other から移動する。
注: 移動元のオブジェクトother は、部分的に形成された状態に置かれる。この状態では、有効な操作は破壊と新しい値の割り当てのみである。
[noexcept]
QSslDiffieHellmanParameters::~QSslDiffieHellmanParameters()
QSslDiffieHellmanParameters オブジェクトを破棄する。
[static]
QSslDiffieHellmanParameters QSslDiffieHellmanParameters::defaultParameters()
QSslSocket が使用するデフォルトのQSslDiffieHellmanParameters を返す。
これは現在、RFC 3526の2048ビットMODPグループである。
[noexcept]
QSslDiffieHellmanParameters::Error QSslDiffieHellmanParameters::error() const
QSslDiffieHellmanParameters オブジェクトが無効である原因となったエラーを返します。
[noexcept]
QString QSslDiffieHellmanParameters::errorString() const
QSslDiffieHellmanParameters オブジェクトが無効である原因となったエラーの、人間が読める説明を返す。
[static]
QSslDiffieHellmanParameters QSslDiffieHellmanParameters::fromEncoded(QIODevice *device, QSsl::EncodingFormat encoding = QSsl::Pem)
encoding で指定された PEM または DER 形式でdevice から読み込み、QSslDiffieHellmanParameters オブジェクトを構築する。
返されたオブジェクトのisValid() メソッドを使用して、Diffie-Hellman パラメータが有効で、正しく読み込まれたかどうかを確認する。
特に、device がnullptr
であったり、読み込みがオープンされていなかったりすると、無効なオブジェクトが返される。
isValid() およびQSslConfigurationも参照のこと 。
[static]
QSslDiffieHellmanParameters QSslDiffieHellmanParameters::fromEncoded(const QByteArray &encoded, QSsl::EncodingFormat encoding = QSsl::Pem)
encoding で指定された PEM または DER 形式のバイト配列encoded を使用してQSslDiffieHellmanParameters オブジェクトを構築する。
返されたオブジェクトのisValid() メソッドを使用して、Diffie-Hellman パラメータが有効であり、正しくロードされているかどうかを確認する。
isValid() およびQSslConfigurationも参照のこと 。
[noexcept]
bool QSslDiffieHellmanParameters::isEmpty() const
空のQSslDiffieHellmanParameters インスタンスの場合、true
を返す。
空のQSslDiffieHellmanParameters インスタンスをQSslSocket-ベースのサーバーに設定すると、Diffie-Hellman鍵交換が無効になる。
[noexcept]
bool QSslDiffieHellmanParameters::isValid() const
これが有効なQSslDiffieHellmanParameters であればtrue
を返し、そうでなければ false を返す。
このメソッドは、QSslDiffieHellmanParameters オブジェクトを構築した後に使用して、その有効性を判断する必要があります。
QSslDiffieHellmanParameters オブジェクトが有効でない場合は、error() メソッドを使用して、オブジェクトの構築を妨げたエラーを調べることができます。
error()も参照 。
[noexcept]
void QSslDiffieHellmanParameters::swap(QSslDiffieHellmanParameters &other)
このQSslDiffieHellmanParameters をother と入れ替える。この操作は非常に速く、失敗することはない。
[noexcept]
QSslDiffieHellmanParameters &QSslDiffieHellmanParameters::operator=(QSslDiffieHellmanParameters &&other)
Move-assignother をこのQSslDiffieHellmanParameters インスタンスに割り当てる。
注: 移動元のオブジェクトother は、部分的に形成された状態に置かれる。この状態では、有効な操作は破壊と新しい値の割り当てのみである。
QSslDiffieHellmanParameters &QSslDiffieHellmanParameters::operator=(const QSslDiffieHellmanParameters &other)
other の内容をこのQSslDiffieHellmanParameters にコピーし、2 つのQSslDiffieHellmanParameters を同一にする。
このQSslDiffieHellmanParameters への参照を返します。
関連する非会員
[noexcept]
size_t qHash(const QSslDiffieHellmanParameters &key, size_t seed = 0)
key のハッシュ値を返す。計算のシードにはseed を使用する。
[noexcept]
bool operator!=(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs)
lhs がrhs と等しくなければtrue
を返し、そうでなければfalse
を返す。
QDebug operator<<(QDebug debug, const QSslDiffieHellmanParameters &dhparam)
dhparam 、デバッグ用にDiffie-Hellmanパラメータのセットをデバッグオブジェクトdebug に書き込む。
Diffie-HellmanパラメータはBase64エンコードされたDER形式で表現される。
デバッグ手法」も参照のこと 。
[noexcept]
bool operator==(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs)
lhs がrhs と等しい場合はtrue
を返し、そうでない場合はfalse
を返す。
© 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.