The QSslDiffieHellmanParameters class provides an interface for Diffie-Hellman parameters for servers. 更多...
| 頭: | #include <QSslDiffieHellmanParameters> |
| qmake: | QT += network |
| Since: | Qt 5.8 |
注意: 此類的所有函數 可重入 .
| enum | Error { NoError, InvalidInputDataError, UnsafeParametersError } |
| QSslDiffieHellmanParameters () | |
| QSslDiffieHellmanParameters (const QSslDiffieHellmanParameters & other ) | |
| QSslDiffieHellmanParameters (QSslDiffieHellmanParameters && other ) | |
| ~QSslDiffieHellmanParameters () | |
| QSslDiffieHellmanParameters::Error | error () const |
| QString | errorString () const |
| bool | isEmpty () const |
| bool | isValid () const |
| void | swap (QSslDiffieHellmanParameters & other ) |
| QSslDiffieHellmanParameters & | operator= (const QSslDiffieHellmanParameters & other ) |
| QSslDiffieHellmanParameters & | operator= (QSslDiffieHellmanParameters && other ) |
| QSslDiffieHellmanParameters | defaultParameters () |
| QSslDiffieHellmanParameters | fromEncoded (const QByteArray & encoded , QSsl::EncodingFormat encoding = QSsl::Pem) |
| QSslDiffieHellmanParameters | fromEncoded (QIODevice * device , QSsl::EncodingFormat encoding = QSsl::Pem) |
| uint | qHash (const QSslDiffieHellmanParameters & dhparam , uint seed = 0) |
| QDebug | operator<< (QDebug debug , const QSslDiffieHellmanParameters & dhparam ) |
| bool | operator== (const QSslDiffieHellmanParameters & lhs , const QSslDiffieHellmanParameters & rhs ) |
The QSslDiffieHellmanParameters class provides an interface for Diffie-Hellman parameters for servers.
QSslDiffieHellmanParameters provides an interface for setting Diffie-Hellman parameters to servers based on QSslSocket .
另請參閱 QSslSocket , QSslCipher ,和 QSslConfiguration .
Describes a QSslDiffieHellmanParameters 錯誤。
| 常量 | 值 | 描述 |
|---|---|---|
QSslDiffieHellmanParameters::NoError
|
0
|
沒有齣現錯誤。 |
QSslDiffieHellmanParameters::InvalidInputDataError
|
1
|
The given input data could not be used to construct a QSslDiffieHellmanParameters 對象。 |
QSslDiffieHellmanParameters::UnsafeParametersError
|
2
|
The Diffie-Hellman parameters are unsafe and should not be used. |
構造空的 QSslDiffieHellmanParameters 實例。
If an empty QSslDiffieHellmanParameters instance is set on a QSslConfiguration object, Diffie-Hellman negotiation will be disabled.
另請參閱 isValid () 和 QSslConfiguration .
Constructs an identical copy of other .
Move-constructs from other .
注意: The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.
銷毀 QSslDiffieHellmanParameters 對象。
[static]
QSslDiffieHellmanParameters
QSslDiffieHellmanParameters::
defaultParameters
()
Returns the default QSslDiffieHellmanParameters used by QSslSocket .
This is currently the 1024-bit MODP group from RFC 2459, also known as the Second Oakley Group.
Returns the error that caused the QSslDiffieHellmanParameters object to be invalid.
Returns a human-readable description of the error that caused the QSslDiffieHellmanParameters object to be invalid.
[static]
QSslDiffieHellmanParameters
QSslDiffieHellmanParameters::
fromEncoded
(const
QByteArray
&
encoded
,
QSsl::EncodingFormat
encoding
= QSsl::Pem)
構造 QSslDiffieHellmanParameters object using the byte array encoded in either PEM or DER form as specified by encoding .
使用 isValid () method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.
另請參閱 isValid () 和 QSslConfiguration .
[static]
QSslDiffieHellmanParameters
QSslDiffieHellmanParameters::
fromEncoded
(
QIODevice
*
device
,
QSsl::EncodingFormat
encoding
= QSsl::Pem)
構造 QSslDiffieHellmanParameters object by reading from device in either PEM or DER form as specified by encoding .
使用 isValid () method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.
In particular, if
device
is
nullptr
or not open for reading, an invalid object will be returned.
另請參閱 isValid () 和 QSslConfiguration .
返迴
true
if this is a an empty
QSslDiffieHellmanParameters
實例。
設置空 QSslDiffieHellmanParameters instance on a QSslSocket -based server will disable Diffie-Hellman key exchange.
返迴
true
if this is a valid
QSslDiffieHellmanParameters
;否則 false。
This method should be used after constructing a QSslDiffieHellmanParameters object to determine its validity.
若 QSslDiffieHellmanParameters object is not valid, you can use the error () method to determine what error prevented the object from being constructed.
另請參閱 error ().
交換此 QSslDiffieHellmanParameters with other 。此函數非常快且從不失敗。
Copies the contents of other 到此 QSslDiffieHellmanParameters , making the two QSslDiffieHellmanParameters identical.
Returns a reference to this QSslDiffieHellmanParameters .
移動賦值 other 到此 QSslDiffieHellmanParameters 實例。
注意: The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.
Returns an hash value for dhparam ,使用 seed 做計算種子。
該函數在 Qt 5.8 引入。
Writes the set of Diffie-Hellman parameters in dhparam 到 debug 對象 debug 為調試目的。
The Diffie-Hellman parameters will be represented in Base64-encoded DER form.
該函數在 Qt 5.8 引入。
另請參閱 調試技術 .
返迴
true
if
lhs
等於
rhs
;否則返迴
false
.
該函數在 Qt 5.8 引入。