QSslKey¶

Synopsis¶
Detailed Description¶
QSslKeyprovides a simple API for managing keys.See also
-
class
QSslKey¶ QSslKey(device, algorithm[, format=QSsl.Pem[, type=QSsl.PrivateKey[, passPhrase=QByteArray()]]])
QSslKey(handle[, type=QSsl.PrivateKey])
QSslKey(encoded, algorithm[, format=QSsl.Pem[, type=QSsl.PrivateKey[, passPhrase=QByteArray()]]])
QSslKey(other)
- param type
KeyType- param format
EncodingFormat- param passPhrase
QByteArray- param device
QIODevice- param algorithm
KeyAlgorithm- param other
- param handle
HANDLE- param encoded
QByteArray
Constructs a null key.
See also
Constructs a
QSslKeyfrom a valid native keyhandle.typespecifies whether the key is public or private.QSslKeywill take ownership for this key and you must not free the key using the native library.Constructs an identical copy of
other.
-
PySide2.QtNetwork.QSslKey.algorithm()¶ - Return type
KeyAlgorithm
Returns the key algorithm.
-
PySide2.QtNetwork.QSslKey.clear()¶ Clears the contents of this key, making it a null key.
See also
-
PySide2.QtNetwork.QSslKey.handle()¶ - Return type
HANDLE
Returns a pointer to the native key handle, if it is available; otherwise a null pointer is returned.
You can use this handle together with the native API to access extended information about the key.
Warning
Use of this function has a high probability of being non-portable, and its return value may vary across platforms, and between minor Qt releases.
-
PySide2.QtNetwork.QSslKey.isNull()¶ - Return type
bool
Returns
trueif this is a null key; otherwise false.See also
-
PySide2.QtNetwork.QSslKey.length()¶ - Return type
int
Returns the length of the key in bits, or -1 if the key is null.
-
PySide2.QtNetwork.QSslKey.__ne__(key)¶ - Parameters
key –
QSslKey- Return type
bool
Returns
trueif this key is not equal to keyother; otherwise returnsfalse.
-
PySide2.QtNetwork.QSslKey.__eq__(key)¶ - Parameters
key –
QSslKey- Return type
bool
Returns
trueif this key is equal toother; otherwise returnsfalse.
-
PySide2.QtNetwork.QSslKey.swap(other)¶ - Parameters
other –
QSslKey
Swaps this ssl key with
other. This function is very fast and never fails.
-
PySide2.QtNetwork.QSslKey.toDer([passPhrase=QByteArray()])¶ - Parameters
passPhrase –
QByteArray- Return type
QByteArray
Returns the key in DER encoding.
The
passPhraseargument should be omitted as DER cannot be encrypted. It will be removed in a future version of Qt.
-
PySide2.QtNetwork.QSslKey.toPem([passPhrase=QByteArray()])¶ - Parameters
passPhrase –
QByteArray- Return type
QByteArray
Returns the key in PEM encoding. The result is encrypted with
passPhraseif the key is a private key andpassPhraseis non-empty.
-
PySide2.QtNetwork.QSslKey.type()¶ - Return type
KeyType
Returns the type of the key (i.e., PublicKey or PrivateKey).
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.