PySide6.QtCoap.QCoapPrivateKey¶
- class QCoapPrivateKey¶
The
QCoapPrivateKeyclass provides an interface for managing CoAP security keys.Details
A
QCoapPrivateKeypackages a private key used in negotiating CoAP connections securely. It holds the information required for authentication usingpre-sharedkeys and X.509 certificates.Synopsis¶
Methods¶
def
__init__()def
algorithm()def
encodingFormat()def
handle()def
isNull()def
key()def
passPhrase()def
swap()
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
- __init__()¶
Constructs an empty instance of
QCoapPrivateKey.- __init__(other)
- Parameters:
other –
QCoapPrivateKey
Copies the contents of
otherinto this key, making the two keys identical.- __init__(handle)
- Parameters:
handle –
Qt::HANDLE
Constructs a
QCoapPrivateKeyfrom a native keyhandle.- __init__(key, algorithm[, format=QSsl.Pem[, passPhrase=QByteArray()]])
- Parameters:
key –
QByteArrayalgorithm –
KeyAlgorithmformat –
EncodingFormatpassPhrase –
QByteArray
Constructs a
QCoapPrivateKeyfrom the byte arraykeyusing the specifiedalgorithmand encodingformat.If the key is encrypted then
passPhraseis required to decrypt it.- algorithm()¶
- Return type:
Returns the key algorithm.
- encodingFormat()¶
- Return type:
Returns the encoding format of the key.
- handle()¶
- Return type:
Qt::HANDLE
Returns a pointer to the native key handle.
- isNull()¶
- Return type:
bool
Returns
trueif the private key is null, returnsfalseotherwise.- key()¶
- Return type:
Returns the encoded private key.
- passPhrase()¶
- Return type:
Returns the passphrase for the key.
- swap(other)¶
- Parameters:
other –
QCoapPrivateKey
Swaps this private key with
other. This operation is very fast and never fails.