Sur cette page

QSslCipher Class

La classe QSslCipher représente un chiffrement cryptographique SSL. Plus d'informations...

En-tête : #include <QSslCipher>
CMake : find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake : QT += network

Remarque : toutes les fonctions de cette classe sont réentrantes.

Fonctions publiques

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

Description détaillée

QSslCipher stocke des informations sur un algorithme de chiffrement. Elle est le plus souvent utilisée avec QSslSocket, soit pour configurer les algorithmes de chiffrement que la socket peut utiliser, soit pour afficher les algorithmes de chiffrement de la socket à l'utilisateur.

Voir aussi QSslSocket et QSslKey.

Documentation des fonctions membres

QSslCipher::QSslCipher()

Construit un objet QSslCipher vide.

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

Construit un objet QSslCipher pour le chiffrement déterminé par name. Le constructeur n'accepte que les chiffres pris en charge (c'est-à-dire que name doit identifier un chiffre dans la liste des chiffres renvoyée par QSslSocket::supportedCiphers()).

Vous pouvez appeler isNull() après la construction pour vérifier si name a correctement identifié un chiffrement pris en charge.

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

Construit un objet QSslCipher pour le chiffrement déterminé par name et protocol. Le constructeur n'accepte que les chiffres pris en charge (c'est-à-dire que name et protocol doivent identifier un chiffre dans la liste des chiffres renvoyée par QSslSocket::supportedCiphers()).

Vous pouvez appeler isNull() après la construction pour vérifier si name et protocol ont correctement identifié un chiffrement pris en charge.

QSslCipher::QSslCipher(const QSslCipher &other)

Construit une copie identique du cryptogramme other.

[noexcept] QSslCipher::~QSslCipher()

Détruit l'objet QSslCipher.

QString QSslCipher::authenticationMethod() const

Renvoie la méthode d'authentification du chiffre sous forme de QString.

QString QSslCipher::encryptionMethod() const

Renvoie la méthode de chiffrement du cryptogramme sous forme de QString.

bool QSslCipher::isNull() const

Renvoie true s'il s'agit d'un cryptogramme nul ; sinon, renvoie false.

QString QSslCipher::keyExchangeMethod() const

Renvoie la méthode d'échange de clés du chiffrement sous la forme d'une adresse QString.

QString QSslCipher::name() const

Renvoie le nom du code, ou un QString vide s'il s'agit d'un code nul.

Voir aussi isNull().

QSsl::SslProtocol QSslCipher::protocol() const

Renvoie le type de protocole du cryptogramme, ou QSsl::UnknownProtocol si QSslCipher n'est pas en mesure de déterminer le protocole (protocolString() peut contenir plus d'informations).

Voir aussi protocolString().

QString QSslCipher::protocolString() const

Renvoie le protocole du chiffrement sous forme de QString.

Voir aussi protocol().

int QSslCipher::supportedBits() const

Renvoie le nombre de bits pris en charge par le système de chiffrement.

Voir aussi usedBits().

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

Remplace cette instance de chiffrement par other. Cette opération est très rapide et n'échoue jamais.

int QSslCipher::usedBits() const

Renvoie le nombre de bits utilisés par le système de chiffrement.

Voir aussi supportedBits().

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

Renvoie true si ce code n'est pas le même que other; sinon, il renvoie false.

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

Copie le contenu de other dans ce cryptogramme, ce qui rend les deux cryptogrammes identiques.

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

Renvoie true si ce cryptogramme est identique à other; sinon, il renvoie 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.