In questa pagina

QSslCipher Class

La classe QSslCipher rappresenta un algoritmo crittografico SSL. Per saperne di più...

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

Nota: tutte le funzioni di questa classe sono rientranti.

Funzioni pubbliche

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

Descrizione dettagliata

QSslCipher memorizza informazioni relative a un algoritmo crittografico. Viene utilizzata più comunemente con ` QSslSocket`, sia per configurare quali algoritmi il socket può utilizzare, sia per visualizzare all'utente gli algoritmi del socket.

Vedi anche QSslSocket e QSslKey.

Documentazione delle funzioni membro

QSslCipher::QSslCipher()

Crea un oggetto QSslCipher vuoto.

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

Crea un oggetto QSslCipher per l'algoritmo di cifratura determinato da name. Il costruttore accetta solo algoritmi di cifratura supportati (ovvero, name deve identificare un algoritmo presente nell'elenco degli algoritmi restituito da QSslSocket::supportedCiphers()).

È possibile chiamare isNull() dopo la creazione per verificare se name ha identificato correttamente un algoritmo di cifratura supportato.

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

Crea un oggetto QSslCipher per l'algoritmo di cifratura determinato da name e protocol. Il costruttore accetta solo algoritmi di cifratura supportati (ovvero, name e protocol devono identificare un algoritmo presente nell'elenco degli algoritmi restituito da QSslSocket::supportedCiphers()).

È possibile chiamare isNull() dopo la creazione per verificare se name e protocol hanno identificato correttamente un algoritmo di cifratura supportato.

QSslCipher::QSslCipher(const QSslCipher &other)

Crea una copia identica dell’algoritmo di cifratura " other ".

[noexcept] QSslCipher::~QSslCipher()

Elimina l'oggetto ` QSslCipher `.

QString QSslCipher::authenticationMethod() const

Restituisce il metodo di autenticazione dell'algoritmo di cifratura sotto forma di oggetto ` QString`.

QString QSslCipher::encryptionMethod() const

Restituisce il metodo di crittografia dell'algoritmo sotto forma di oggetto ` QString`.

bool QSslCipher::isNull() const

Restituisce ` true ` se si tratta di una cifratura nulla; altrimenti restituisce ` false`.

QString QSslCipher::keyExchangeMethod() const

Restituisce il metodo di scambio delle chiavi dell'algoritmo di cifratura come oggetto di tipo ` QString`.

QString QSslCipher::name() const

Restituisce il nome dell'algoritmo di cifratura oppure un oggetto ` QString ` vuoto se si tratta di un algoritmo nullo.

Vedi anche isNull().

QSsl::SslProtocol QSslCipher::protocol() const

Restituisce il tipo di protocollo della cipher oppure " QSsl::UnknownProtocol " se " QSslCipher " non è in grado di determinare il protocollo (la funzione "protocolString()" potrebbe contenere ulteriori informazioni).

Vedi anche protocolString().

QString QSslCipher::protocolString() const

Restituisce il protocollo dell'algoritmo di cifratura come oggetto di tipo ` QString`.

Vedi anche protocol().

int QSslCipher::supportedBits() const

Restituisce il numero di bit supportati dall'algoritmo di cifratura.

Vedi anche usedBits().

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

Sostituisce questa istanza di cipher con other. Questa operazione è molto veloce e non fallisce mai.

int QSslCipher::usedBits() const

Restituisce il numero di bit utilizzati dall'algoritmo di cifratura.

Vedi anche ` supportedBits()`.

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

Restituisce ` true ` se questo algoritmo di cifratura non è lo stesso di ` other`; in caso contrario, restituisce `false`.

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

Copia il contenuto di other in questo file cifrato, rendendo i due file identici.

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

Restituisce ` true ` se questo algoritmo di cifratura è uguale a ` other`; in caso contrario, restituisce `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.