QSslCipher 类

The QSslCipher class represents an SSL cryptographic cipher. 更多...

头: #include <QSslCipher>
qmake: QT += network
Since: Qt 4.3

注意: 此类的所有函数 可重入 .

公共函数

QSslCipher ()
QSslCipher (const QString & name )
QSslCipher (const QString & name , QSsl::SslProtocol protocol )
QSslCipher (const QSslCipher & other )
~QSslCipher ()
QString authenticationMethod () const
QString encryptionMethod () const
bool isNull () const
QString keyExchangeMethod () const
QString name () const
QSsl::SslProtocol protocol () const
QString protocolString () const
int supportedBits () const
void swap (QSslCipher & other )
int usedBits () const
bool operator!= (const QSslCipher & other ) const
QSslCipher & operator= (QSslCipher && other )
QSslCipher & operator= (const QSslCipher & other )
bool operator== (const QSslCipher & other ) const

详细描述

The QSslCipher class represents an SSL cryptographic cipher.

QSslCipher stores information about one cryptographic cipher. It is most commonly used with QSslSocket ,要么用于配置套接字可以使用哪些密码,要么用于向用户显示套接字密码。

另请参阅 QSslSocket and QSslKey .

成员函数文档编制

QSslCipher:: QSslCipher ()

构造空的 QSslCipher 对象。

QSslCipher:: QSslCipher (const QString & name )

构造 QSslCipher object for the cipher determined by name 。构造函数只接受支持的密码 (即 name 必须以密码列表标识密码,返回通过 QSslSocket::supportedCiphers())。

可以调用 isNull () after construction to check if name correctly identified a supported cipher.

该函数在 Qt 5.3 引入。

QSslCipher:: QSslCipher (const QString & name , QSsl::SslProtocol protocol )

构造 QSslCipher object for the cipher determined by name and protocol 。构造函数只接受支持的密码 (即 name and protocol 必须以密码列表标识密码,返回通过 QSslSocket::supportedCiphers())。

可以调用 isNull () after construction to check if name and protocol correctly identified a supported cipher.

QSslCipher:: QSslCipher (const QSslCipher & other )

构造等同副本的 other 密码。

QSslCipher:: ~QSslCipher ()

销毁 QSslCipher 对象。

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

返回 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 若这为 null 密码。

另请参阅 isNull ().

QSsl::SslProtocol QSslCipher:: protocol () const

返回密码协议类型,或 QSsl::UnknownProtocol if QSslCipher is unable to determine the protocol ( protocolString () may contain more information).

另请参阅 protocolString ().

QString QSslCipher:: protocolString () const

返回密码协议如 QString .

另请参阅 protocol ().

int QSslCipher:: supportedBits () const

返回密码支持的位数。

另请参阅 usedBits ().

void QSslCipher:: swap ( QSslCipher & other )

交换此密码实例与 other 。此函数非常快且从不失败。

该函数在 Qt 5.0 引入。

int QSslCipher:: usedBits () const

返回密码使用的位数。

另请参阅 supportedBits ().

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

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

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

移动赋值运算符。

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

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