![]() |
Qt 6.x
The Qt SDK
|
The QSslCipher class represents an SSL cryptographic cipher. More...
#include <qsslcipher.h>
Public Member Functions | |
QSslCipher () | |
Constructs an empty QSslCipher object. | |
QSslCipher (const QString &name) | |
QSslCipher (const QString &name, QSsl::SslProtocol protocol) | |
Constructs a QSslCipher object for the cipher determined by name and protocol. | |
QSslCipher (const QSslCipher &other) | |
Constructs an identical copy of the other cipher. | |
QSslCipher & | operator= (QSslCipher &&other) noexcept |
QSslCipher & | operator= (const QSslCipher &other) |
Copies the contents of other into this cipher, making the two ciphers identical. | |
~QSslCipher () | |
Destroys the QSslCipher object. | |
void | swap (QSslCipher &other) noexcept |
bool | operator== (const QSslCipher &other) const |
Returns true if this cipher is the same as other; otherwise, false is returned. | |
bool | operator!= (const QSslCipher &other) const |
Returns true if this cipher is not the same as other; otherwise, false is returned. | |
bool | isNull () const |
Returns true if this is a null cipher; otherwise returns false . | |
QString | name () const |
Returns the name of the cipher, or an empty QString if this is a null cipher. | |
int | supportedBits () const |
Returns the number of bits supported by the cipher. | |
int | usedBits () const |
Returns the number of bits used by the cipher. | |
QString | keyExchangeMethod () const |
Returns the cipher's key exchange method as a QString. | |
QString | authenticationMethod () const |
Returns the cipher's authentication method as a QString. | |
QString | encryptionMethod () const |
Returns the cipher's encryption method as a QString. | |
QString | protocolString () const |
Returns the cipher's protocol as a QString. | |
QSsl::SslProtocol | protocol () const |
Returns the cipher's protocol type, or \l QSsl::UnknownProtocol if QSslCipher is unable to determine the protocol (protocolString() may contain more information). | |
Friends | |
class | QTlsBackend |
The QSslCipher class represents an SSL cryptographic cipher.
\reentrant
\inmodule QtNetwork
QSslCipher stores information about one cryptographic cipher. It is most commonly used with QSslSocket, either for configuring which ciphers the socket can use, or for displaying the socket's ciphers to the user.
Definition at line 21 of file qsslcipher.h.
QSslCipher::QSslCipher | ( | ) |
Constructs an empty QSslCipher object.
Definition at line 41 of file qsslcipher.cpp.
|
explicit |
Constructs a QSslCipher object for the cipher determined by name. The constructor accepts only supported ciphers (i.e., the name must identify a cipher in the list of ciphers returned by QSslSocket::supportedCiphers()).
You can call isNull() after construction to check if name correctly identified a supported cipher.
Definition at line 57 of file qsslcipher.cpp.
References name(), and QSslConfiguration::supportedCiphers().
QSslCipher::QSslCipher | ( | const QString & | name, |
QSsl::SslProtocol | protocol | ||
) |
Constructs a QSslCipher object for the cipher determined by name and protocol.
The constructor accepts only supported ciphers (i.e., the name and protocol must identify a cipher in the list of ciphers returned by QSslSocket::supportedCiphers()).
You can call isNull() after construction to check if name and protocol correctly identified a supported cipher.
Definition at line 79 of file qsslcipher.cpp.
References protocol(), and QSslConfiguration::supportedCiphers().
QSslCipher::QSslCipher | ( | const QSslCipher & | other | ) |
Constructs an identical copy of the other cipher.
Definition at line 94 of file qsslcipher.cpp.
References other().
QSslCipher::~QSslCipher | ( | ) |
Destroys the QSslCipher object.
Definition at line 103 of file qsslcipher.cpp.
QString QSslCipher::authenticationMethod | ( | ) | const |
Returns the cipher's authentication method as a QString.
Definition at line 191 of file qsslcipher.cpp.
QString QSslCipher::encryptionMethod | ( | ) | const |
Returns the cipher's encryption method as a QString.
Definition at line 199 of file qsslcipher.cpp.
bool QSslCipher::isNull | ( | ) | const |
Returns true
if this is a null cipher; otherwise returns false
.
Definition at line 144 of file qsslcipher.cpp.
Referenced by QSecureTransportBackend::ensureInitialized(), and QSslConfiguration::setCiphers().
QString QSslCipher::keyExchangeMethod | ( | ) | const |
Returns the cipher's key exchange method as a QString.
Definition at line 183 of file qsslcipher.cpp.
QString QSslCipher::name | ( | ) | const |
Returns the name of the cipher, or an empty QString if this is a null cipher.
Definition at line 155 of file qsslcipher.cpp.
Referenced by QSslCipher(), operator<<(), and QTlsPrivate::TlsCryptographSecureTransport::SSLCipherSuite_from_QSslCipher().
|
inline |
Returns true
if this cipher is not the same as other; otherwise, false is returned.
Definition at line 36 of file qsslcipher.h.
References operator==(), and other().
QSslCipher & QSslCipher::operator= | ( | const QSslCipher & | other | ) |
Copies the contents of other into this cipher, making the two ciphers identical.
Definition at line 111 of file qsslcipher.cpp.
References other().
|
inlinenoexcept |
Definition at line 28 of file qsslcipher.h.
References other(), and swap().
bool QSslCipher::operator== | ( | const QSslCipher & | other | ) | const |
Returns true
if this cipher is the same as other; otherwise, false is returned.
Definition at line 129 of file qsslcipher.cpp.
References other().
QSsl::SslProtocol QSslCipher::protocol | ( | ) | const |
Returns the cipher's protocol type, or \l QSsl::UnknownProtocol if QSslCipher is unable to determine the protocol (protocolString() may contain more information).
Definition at line 221 of file qsslcipher.cpp.
Referenced by QSslCipher().
QString QSslCipher::protocolString | ( | ) | const |
Returns the cipher's protocol as a QString.
Definition at line 209 of file qsslcipher.cpp.
Referenced by operator<<().
int QSslCipher::supportedBits | ( | ) | const |
Returns the number of bits supported by the cipher.
Definition at line 165 of file qsslcipher.cpp.
|
inlinenoexcept |
Swaps this cipher instance with other. This function is very fast and never fails.
Definition at line 32 of file qsslcipher.h.
int QSslCipher::usedBits | ( | ) | const |
Returns the number of bits used by the cipher.
Definition at line 175 of file qsslcipher.cpp.
Referenced by operator<<().
|
friend |
Definition at line 52 of file qsslcipher.h.