En esta página

QSslCipher Class

La clase QSslCipher representa un cifrado criptográfico SSL. Más...

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

Nota: Todas las funciones de esta clase son reentrantes.

Funciones Públicas

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

Descripción Detallada

QSslCipher almacena información sobre un cifrado criptográfico. Se usa más comúnmente con QSslSocket, ya sea para configurar qué cifradores puede usar el socket, o para mostrar los cifradores del socket al usuario.

Véase también QSslSocket y QSslKey.

Documentación de las funciones miembro

QSslCipher::QSslCipher()

Construye un objeto QSslCipher vacío.

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

Construye un objeto QSslCipher para el cifrado determinado por name. El constructor sólo acepta cifrados soportados (es decir, name debe identificar un cifrado en la lista de cifrados devuelta por QSslSocket::supportedCiphers()).

Puede llamar a isNull() después de la construcción para comprobar si name identificó correctamente un cifrado soportado.

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

Construye un objeto QSslCipher para el cifrado determinado por name y protocol. El constructor sólo acepta cifrados soportados (es decir, name y protocol deben identificar un cifrado en la lista de cifrados devuelta por QSslSocket::supportedCiphers()).

Puede llamar a isNull() después de la construcción para comprobar si name y protocol identificaron correctamente un cifrado soportado.

QSslCipher::QSslCipher(const QSslCipher &other)

Construye una copia idéntica del cifrado other.

[noexcept] QSslCipher::~QSslCipher()

Destruye el objeto QSslCipher.

QString QSslCipher::authenticationMethod() const

Devuelve el método de autenticación del cifrado como QString.

QString QSslCipher::encryptionMethod() const

Devuelve el método de cifrado del cifrado como QString.

bool QSslCipher::isNull() const

Devuelve true si se trata de un cifrado nulo; en caso contrario, devuelve false.

QString QSslCipher::keyExchangeMethod() const

Devuelve el método de intercambio de claves del cifrado como QString.

QString QSslCipher::name() const

Devuelve el nombre del cifrado, o un QString vacío si se trata de un cifrado nulo.

Véase también isNull().

QSsl::SslProtocol QSslCipher::protocol() const

Devuelve el tipo de protocolo del cifrado, o QSsl::UnknownProtocol si QSslCipher no puede determinar el protocolo (protocolString() puede contener más información).

Véase también protocolString().

QString QSslCipher::protocolString() const

Devuelve el protocolo de cifrado como QString.

Véase también protocol().

int QSslCipher::supportedBits() const

Devuelve el número de bits soportados por el cifrado.

Véase también usedBits().

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

Intercambia esta instancia de cifrado con other. Esta operación es muy rápida y nunca falla.

int QSslCipher::usedBits() const

Devuelve el número de bits utilizados por el cifrado.

Véase también supportedBits().

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

Devuelve true si este cifrado no es el mismo que other; en caso contrario, devuelve false.

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

Copia el contenido de other en este cifrado, haciendo que los dos cifrados sean idénticos.

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

Devuelve true si este cifrado es el mismo que other; en caso contrario, devuelve 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.