PySide6.QtNetwork.QSslCipher¶
- class QSslCipher¶
The
QSslCipherclass represents an SSL cryptographic cipher. More…Synopsis¶
Methods¶
def
__init__()def
isNull()def
name()def
__ne__()def
__eq__()def
protocol()def
protocolString()def
supportedBits()def
swap()def
usedBits()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
QSslCipherstores information about one cryptographic cipher. It is most commonly used withQSslSocket, either for configuring which ciphers the socket can use, or for displaying the socket’s ciphers to the user.See also
- __init__()¶
Constructs an empty
QSslCipherobject.- __init__(other)
- Parameters:
other –
QSslCipher
Constructs an identical copy of the
othercipher.- __init__(name)
- Parameters:
name – str
Constructs a
QSslCipherobject for the cipher determined byname. The constructor accepts only supported ciphers (i.e., thenamemust identify a cipher in the list of ciphers returned by QSslSocket::supportedCiphers()).You can call
isNull()after construction to check ifnamecorrectly identified a supported cipher.- __init__(name, protocol)
- Parameters:
name – str
protocol –
SslProtocol
Constructs a
QSslCipherobject for the cipher determined bynameandprotocol. The constructor accepts only supported ciphers (i.e., thenameandprotocolmust identify a cipher in the list of ciphers returned by QSslSocket::supportedCiphers()).You can call
isNull()after construction to check ifnameandprotocolcorrectly identified a supported cipher.- authenticationMethod()¶
- Return type:
str
Returns the cipher’s authentication method as a QString.
- encryptionMethod()¶
- Return type:
str
Returns the cipher’s encryption method as a QString.
- isNull()¶
- Return type:
bool
Returns
trueif this is a null cipher; otherwise returnsfalse.- keyExchangeMethod()¶
- Return type:
str
Returns the cipher’s key exchange method as a QString.
- name()¶
- Return type:
str
Returns the name of the cipher, or an empty QString if this is a null cipher.
See also
- __ne__(other)¶
- Parameters:
other –
QSslCipher- Return type:
bool
Returns
trueif this cipher is not the same asother; otherwise, false is returned.- __eq__(other)¶
- Parameters:
other –
QSslCipher- Return type:
bool
Returns
trueif this cipher is the same asother; otherwise, false is returned.- protocol()¶
- Return type:
Returns the cipher’s protocol type, or
UnknownProtocolifQSslCipheris unable to determine the protocol (protocolString()may contain more information).See also
- protocolString()¶
- Return type:
str
Returns the cipher’s protocol as a QString.
See also
- supportedBits()¶
- Return type:
int
Returns the number of bits supported by the cipher.
See also
- swap(other)¶
- Parameters:
other –
QSslCipher
Swaps this cipher instance with
other. This operation is very fast and never fails.- usedBits()¶
- Return type:
int
Returns the number of bits used by the cipher.
See also