QSslCipher Class
La clase QSslCipher representa un algoritmo criptográfico SSL. Más información...
| Encabezado: | #include <QSslCipher> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
| qmake: | QT += network |
- Lista de todos los miembros, incluidos los heredados
- QSslCipher forma parte de la API de programación de redes y de las clases compartidas implícitamente.
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 utiliza con mayor frecuencia junto con ` QSslSocket`, ya sea para configurar qué cifrados puede utilizar el socket o para mostrar al usuario los cifrados del socket.
Véase también ` QSslSocket ` y ` QSslKey`.
Documentación de las funciones miembro
QSslCipher::QSslCipher()
Crea un objeto QSslCipher vacío.
[explicit] QSslCipher::QSslCipher(const QString &name)
Crea un objeto QSslCipher para el cifrado determinado por ` name`. El constructor solo acepta cifrados compatibles (es decir, ` name ` debe identificar un cifrado que figure en la lista de cifrados devuelta por `QSslSocket::supportedCiphers()`).
Se puede llamar a ` isNull()` tras la creación para comprobar si ` name ` ha identificado correctamente un cifrado compatible.
QSslCipher::QSslCipher(const QString &name, QSsl::SslProtocol protocol)
Crea un objeto QSslCipher para el cifrado determinado por name y protocol. El constructor solo acepta cifrados compatibles (es decir, name y protocol deben identificar un cifrado de la lista de cifrados devuelta por QSslSocket::supportedCiphers()).
Se puede llamar a isNull() tras la construcción para comprobar si name y protocol han identificado correctamente un cifrado compatible.
QSslCipher::QSslCipher(const QSslCipher &other)
Crea una copia idéntica del cifrado « other ».
[noexcept] QSslCipher::~QSslCipher()
Elimina el objeto « QSslCipher ».
QString QSslCipher::authenticationMethod() const
Devuelve el método de autenticación del cifrado como un objeto ` QString`.
QString QSslCipher::encryptionMethod() const
Devuelve el método de cifrado del cifrado como un objeto ` 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 un objeto ` QString`.
QString QSslCipher::name() const
Devuelve el nombre del cifrado o un objeto ` 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 (la función `protocolString()` puede contener más información).
Véase también protocolString().
QString QSslCipher::protocolString() const
Devuelve el protocolo del cifrado como un objeto ` QString`.
Véase también protocol().
int QSslCipher::supportedBits() const
Devuelve el número de bits que admite el cifrado.
Véase también usedBits().
[noexcept] void QSslCipher::swap(QSslCipher &other)
Cambia esta instancia de cifrado por other. Esta operación es muy rápida y nunca falla.
int QSslCipher::usedBits() const
Devuelve el número de bits que utiliza 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, de modo que ambos cifrados quedan 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.