このページでは

QSslCipher Class

QSslCipher クラスは、SSL 暗号化アルゴリズムを表します。詳細...

ヘッダー: #include <QSslCipher>
CMake: find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake: QT += network

注:このクラスのすべての関数は再入可能です。

パブリック関数

QSslCipher()
QSslCipher(const QString &name)
QSslCipher(const QString &name, QSsl::SslProtocol protocol)
QSslCipher(const QSslCipher &other)
~QSslCipher()
QString authenticationMethod() const
QString encryptionMethod() const
bool isNull() const
QString keyExchangeMethod() const
QString name() const
QSsl::SslProtocol protocol() const
QString protocolString() const
int supportedBits() const
void swap(QSslCipher &other)
int usedBits() const
bool operator!=(const QSslCipher &other) const
QSslCipher &operator=(const QSslCipher &other)
bool operator==(const QSslCipher &other) const

詳細な説明

QSslCipher は、1 つの暗号化アルゴリズムに関する情報を格納します。これは、QSslSocket と組み合わせて、ソケットが使用できる暗号化アルゴリズムを設定したり、ソケットの暗号化アルゴリズムをユーザーに表示したりするために、最も一般的に使用されます。

QSslSocket およびQSslKeyも参照してください 。

メンバ関数のドキュメント

QSslCipher::QSslCipher()

空の QSslCipher オブジェクトを生成します。

[explicit] QSslCipher::QSslCipher(const QString &name)

name で指定された暗号方式に対応する QSslCipher オブジェクトを生成します。このコンストラクタは、サポートされている暗号方式のみを受け付けます(つまり、name は、QSslSocket::supportedCiphers() が返す暗号方式のリストに含まれる暗号方式を指定する必要があります)。

構築後にisNull() を呼び出すことで、name がサポートされている暗号を正しく特定できたかどうかを確認できます。

QSslCipher::QSslCipher(const QString &name, QSsl::SslProtocol protocol)

name およびprotocol で指定された暗号方式に対する QSslCipher オブジェクトを生成します。このコンストラクタは、サポートされている暗号方式のみを受け付けます(つまり、name およびprotocol は、QSslSocket::supportedCiphers() が返す暗号方式のリストに含まれる暗号方式を指定する必要があります)。

インスタンス化後にisNull()を呼び出すことで、name およびprotocol がサポートされている暗号を正しく指定しているかどうかを確認できます。

QSslCipher::QSslCipher(const QSslCipher &other)

other 暗号の完全な複製を作成します。

[noexcept] QSslCipher::~QSslCipher()

QSslCipher オブジェクトを破棄します。

QString QSslCipher::authenticationMethod() const

暗号の認証方式をQString として返します。

QString QSslCipher::encryptionMethod() const

暗号化アルゴリズムの暗号化方式をQString として返します。

bool QSslCipher::isNull() const

これがヌル暗号である場合は `true ` を返し、そうでない場合は `false` を返します。

QString QSslCipher::keyExchangeMethod() const

暗号の鍵交換方式をQString として返します。

QString QSslCipher::name() const

暗号の名称を返します。ヌル暗号の場合は、空のQString を返します。

isNull()も参照してください 。

QSsl::SslProtocol QSslCipher::protocol() const

暗号化プロトコルの種類を返します。QSslCipher がプロトコルを特定できない場合は、QSsl::UnknownProtocol を返します(protocolString()には、より多くの情報が含まれている場合があります)。

protocolString()も参照してください 。

QString QSslCipher::protocolString() const

暗号のプロトコルを `QString` として返します。

protocol()も参照してください 。

int QSslCipher::supportedBits() const

その暗号方式でサポートされているビット数を返します。

usedBits()も参照してください 。

[noexcept] void QSslCipher::swap(QSslCipher &other)

この暗号インスタンスをother と入れ替えます。この操作は非常に高速で、失敗することはありません。

int QSslCipher::usedBits() const

その暗号方式で使用されるビット数を返します。

supportedBits()も参照してください 。

bool QSslCipher::operator!=(const QSslCipher &other) const

この暗号が `other` と一致しない場合、true を返します。一致する場合は false を返します。

QSslCipher &QSslCipher::operator=(const QSslCipher &other)

other の内容をこの暗号にコピーし、2つの暗号の内容を同一にします。

bool QSslCipher::operator==(const QSslCipher &other) const

この暗号がother と同じ場合は `true ` を返し、そうでない場合は `false` を返します。

© 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.