PySide6.QtNetwork.QSslCipher¶
- class QSslCipher¶
QSslCipher
类表示一个SSL加密算法。更多…概要¶
方法¶
def
__init__()
def
isNull()
def
name()
def
__ne__()
def
__eq__()
def
protocol()
def
protocolString()
def
supportedBits()
def
swap()
def
usedBits()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
QSslCipher
存储有关一种加密密码的信息。它最常与QSslSocket
一起使用,用于配置套接字可以使用的密码,或向用户显示套接字的密码。另请参阅
- __init__()¶
构造一个空的
QSslCipher
对象。- __init__(other)
- Parameters:
其他 –
QSslCipher
构造一个与
other
密码相同的副本。- __init__(name)
- Parameters:
name – str
构造一个由
name
确定的QSslCipher
对象。该构造函数仅接受支持的加密算法(即,name
必须标识QSslSocket::supportedCiphers()返回的加密算法列表中的一个加密算法)。你可以在构造后调用
isNull()
来检查name
是否正确识别了一个支持的加密算法。- __init__(name, protocol)
- Parameters:
name – str
protocol –
SslProtocol
构造一个由
name
和protocol
确定的QSslCipher
对象。构造函数仅接受支持的加密算法(即,name
和protocol
必须标识QSslSocket::supportedCiphers()返回的加密算法列表中的一个加密算法)。你可以在构建后调用
isNull()
来检查name
和protocol
是否正确识别了支持的加密方式。- authenticationMethod()¶
- Return type:
字符串
返回密码的身份验证方法作为QString。
- encryptionMethod()¶
- Return type:
字符串
返回密码的加密方法作为QString。
- isNull()¶
- Return type:
布尔
如果这是一个空密码,则返回
true
;否则返回false
。- keyExchangeMethod()¶
- Return type:
字符串
返回密码的密钥交换方法作为QString。
- name()¶
- Return type:
字符串
返回加密算法的名称,如果这是一个空加密算法,则返回空的QString。
另请参阅
- __ne__(other)¶
- Parameters:
其他 –
QSslCipher
- Return type:
布尔
如果此密码与
other
不相同,则返回true
;否则,返回false。- __eq__(other)¶
- Parameters:
其他 –
QSslCipher
- Return type:
布尔
如果此密码与
other
相同,则返回true
;否则返回false。- protocol()¶
- Return type:
返回加密协议的协议类型,如果
QSslCipher
无法确定协议(protocolString()
可能包含更多信息),则返回UnknownProtocol
。另请参阅
- protocolString()¶
- Return type:
字符串
返回密码的协议作为QString。
另请参阅
- supportedBits()¶
- Return type:
整数
返回密码支持的位数。
另请参阅
- swap(other)¶
- Parameters:
其他 –
QSslCipher
将此密码实例与
other
交换。此函数非常快速且永远不会失败。- usedBits()¶
- Return type:
整数
返回密码使用的位数。
另请参阅