PySide6.QtCoap.QCoapPrivateKey¶
- class QCoapPrivateKey¶
The
QCoapPrivateKey
class 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
QCoapPrivateKey
packages a private key used in negotiating CoAP connections securely. It holds the information required for authentication usingpre-shared
keys and X.509 certificates.- __init__()¶
Constructs an empty instance of
QCoapPrivateKey
.- __init__(other)
- Parameters:
other –
QCoapPrivateKey
Copies the contents of
other
into this key, making the two keys identical.- __init__(handle)
- Parameters:
handle –
Qt::HANDLE
Constructs a
QCoapPrivateKey
from a native keyhandle
.- __init__(key, algorithm[, format=QSsl.Pem[, passPhrase=QByteArray()]])
- Parameters:
key –
QByteArray
algorithm –
KeyAlgorithm
format –
EncodingFormat
passPhrase –
QByteArray
Constructs a
QCoapPrivateKey
from the byte arraykey
using the specifiedalgorithm
and encodingformat
.If the key is encrypted then
passPhrase
is 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
true
if the private key is null, returnsfalse
otherwise.- 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.