- class QSslCipher¶
The
QSslCipher
class 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¶
QSslCipher
stores 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
QSslCipher
object.- __init__(other)
- Parameters:
other –
QSslCipher
Constructs an identical copy of the
other
cipher.- __init__(name)
- Parameters:
name – str
Constructs a
QSslCipher
object for the cipher determined byname
. The constructor accepts only supported ciphers (i.e., thename
must identify a cipher in the list of ciphers returned by QSslSocket::supportedCiphers()).You can call
isNull()
after construction to check ifname
correctly identified a supported cipher.- __init__(name, protocol)
- Parameters:
name – str
protocol –
SslProtocol
Constructs a
QSslCipher
object for the cipher determined byname
andprotocol
. The constructor accepts only supported ciphers (i.e., thename
andprotocol
must identify a cipher in the list of ciphers returned by QSslSocket::supportedCiphers()).You can call
isNull()
after construction to check ifname
andprotocol
correctly 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
true
if 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
true
if this cipher is not the same asother
; otherwise, false is returned.- __eq__(other)¶
- Parameters:
other –
QSslCipher
- Return type:
bool
Returns
true
if this cipher is the same asother
; otherwise, false is returned.- protocol()¶
- Return type:
Returns the cipher’s protocol type, or
UnknownProtocol
ifQSslCipher
is 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 function is very fast and never fails.- usedBits()¶
- Return type:
int
Returns the number of bits used by the cipher.
See also