e QCoapPrivateKey 类提供用于管理 CoAP 安全密钥的接口。 更多...
头: | #include <QCoapPrivateKey> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Coap)
target_link_libraries(mytarget PRIVATE Qt6::Coap) |
qmake: | QT += coap |
QCoapPrivateKey () | |
QCoapPrivateKey (const QByteArray & key , QSsl::KeyAlgorithm algorithm , QSsl::EncodingFormat format = QSsl::Pem, const QByteArray & passPhrase = QByteArray()) | |
QCoapPrivateKey (const Qt::HANDLE & handle ) | |
QCoapPrivateKey (const QCoapPrivateKey & other ) | |
QCoapPrivateKey (QCoapPrivateKey && other ) | |
~QCoapPrivateKey () | |
QSsl::KeyAlgorithm | algorithm () const |
QSsl::EncodingFormat | encodingFormat () const |
Qt::HANDLE | handle () const |
bool | isNull () const |
QByteArray | key () const |
QByteArray | passPhrase () const |
void | swap (QCoapPrivateKey & other ) |
QCoapPrivateKey & | operator= (const QCoapPrivateKey & other ) |
A QCoapPrivateKey packages a private key used in negotiating CoAP connections securely. It holds the information required for authentication using
pre-shared
密钥和 X.509 证书。
Constructs an empty instance of QCoapPrivateKey.
Constructs a QCoapPrivateKey from the byte array key 使用指定 algorithm 和编码 format .
If the key is encrypted then passPhrase is required to decrypt it.
Constructs a QCoapPrivateKey from a native key handle .
Copies the contents of other into this key, making the two keys identical.
[noexcept]
QCoapPrivateKey::
QCoapPrivateKey
(
QCoapPrivateKey
&&
other
)
Move-constructs a QCoapPrivateKey, making it point to the same object as other 所指向的。
[noexcept]
QCoapPrivateKey::
~QCoapPrivateKey
()
Releases any resources held by QCoapPrivateKey .
Returns the key algorithm.
Returns the encoding format of the key.
Returns a pointer to the native key handle.
返回
true
若私钥私钥为 null,返回
false
否则。
Returns the encoded private key.
返回密钥的口令短语。
[noexcept]
void
QCoapPrivateKey::
swap
(
QCoapPrivateKey
&
other
)
Swaps this private key with other 。此操作非常快且从不失败。
Copies the contents of other into this key, making the two keys identical.
Returns a reference to this QCoapPrivateKey .