PySide6.QtCoap.QCoapPrivateKey¶
- class QCoapPrivateKey¶
- The - QCoapPrivateKeyclass provides an interface for managing CoAP security keys. More…- 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 - Detailed Description¶- A - QCoapPrivateKeypackages a private key used in negotiating CoAP connections securely. It holds the information required for authentication using- pre-sharedkeys and X.509 certificates.- __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 key- handle.- __init__(key, algorithm[, format=QSsl.Pem[, passPhrase=QByteArray()]])
- Parameters:
- key – - QByteArray
- algorithm – - KeyAlgorithm
- format – - EncodingFormat
- passPhrase – - QByteArray
 
 
 - Constructs a - QCoapPrivateKeyfrom the byte array- keyusing the specified- algorithmand encoding- format.- 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, returns- falseotherwise.- 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.