IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QSslCipher Class

The QSslCipher class represents an SSL cryptographic cipher.

All functions in this class are reentrant.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QSslCipher Class

  • Header: QSslCipher

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Network)

    target_link_libraries(mytarget PRIVATE Qt6::Network)

  • qmake: QT += network

  • Group: QSslCipher is part of Network Programming API, ssl, shared

Detailed Description

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.

See Also

See also QSslSocket, QSslKey

Member Function Documentation

 

QSslCipher::QSslCipher()

Constructs an empty QSslCipher object.

[explicit, since 5.3] QSslCipher::QSslCipher(const QString &name)

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.

This function was introduced in Qt 5.3.

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.

QSslCipher::QSslCipher(const QSslCipher &other)

Constructs an identical copy of the other cipher.

QSslCipher::~QSslCipher()

Destroys the QSslCipher object.

QString QSslCipher::authenticationMethod() const

Returns the cipher's authentication method as a QString.

QString QSslCipher::encryptionMethod() const

Returns the cipher's encryption method as a QString.

bool QSslCipher::isNull() const

Returns true if this is a null cipher; otherwise returns false.

QString QSslCipher::keyExchangeMethod() const

Returns the cipher's key exchange method as a QString.

QString QSslCipher::name() const

Returns the name of the cipher, or an empty QString if this is a null cipher.

See Also

See also isNull()

QSsl::SslProtocol QSslCipher::protocol() const

Returns the cipher's protocol type, or QSsl::UnknownProtocol if QSslCipher is unable to determine the protocol (protocolString() may contain more information).

See Also

See also protocolString()

QString QSslCipher::protocolString() const

Returns the cipher's protocol as a QString.

See Also

See also protocol()

int QSslCipher::supportedBits() const

Returns the number of bits supported by the cipher.

See Also

See also usedBits()

[since 5.0] void QSslCipher::swap(QSslCipher &other)

Swaps this cipher instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

int QSslCipher::usedBits() const

Returns the number of bits used by the cipher.

See Also

See also supportedBits()

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

Returns true if this cipher is not the same as other; otherwise, false is returned.

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

Copies the contents of other into this cipher, making the two ciphers identical.

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

Returns true if this cipher is the same as other; otherwise, false is returned.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+