QCoapPrivateKey 類

e QCoapPrivateKey 類提供用於管理 CoAP 安全密鑰的接口。 更多...

頭: #include <QCoapPrivateKey>
qmake: QT += coap

公共函數

QCoapPrivateKey (QCoapPrivateKey && other )
QCoapPrivateKey (const QCoapPrivateKey & other )
QCoapPrivateKey (const Qt::HANDLE & handle )
QCoapPrivateKey (const QByteArray & key , QSsl::KeyAlgorithm algorithm , QSsl::EncodingFormat format = QSsl::Pem, const QByteArray & passPhrase = QByteArray())
QCoapPrivateKey ()
QCoapPrivateKey & operator= (const 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 )

詳細描述

A QCoapPrivateKey packages a private key used in negotiating CoAP connections securely. It holds the information required for authentication using pre-shared 密鑰和 X.509 證書。

成員函數文檔編製

QCoapPrivateKey:: QCoapPrivateKey ( QCoapPrivateKey && other )

Move-constructs a QCoapPrivateKey, making it point to the same object as other 所指嚮的。

QCoapPrivateKey:: QCoapPrivateKey (const QCoapPrivateKey & other )

Copies the contents of other into this key, making the two keys identical.

QCoapPrivateKey:: QCoapPrivateKey (const Qt::HANDLE & handle )

Constructs a QCoapPrivateKey from a native key handle .

QCoapPrivateKey:: QCoapPrivateKey (const QByteArray & key , QSsl::KeyAlgorithm algorithm , QSsl::EncodingFormat format = QSsl::Pem, const QByteArray & passPhrase = QByteArray())

Constructs a QCoapPrivateKey from the byte array key 使用指定 algorithm 和編碼 format .

If the key is encrypted then passPhrase is required to decrypt it.

QCoapPrivateKey:: QCoapPrivateKey ()

Constructs an empty instance of QCoapPrivateKey.

QCoapPrivateKey &QCoapPrivateKey:: operator= (const QCoapPrivateKey & other )

Copies the contents of other into this key, making the two keys identical.

Returns a reference to this QCoapPrivateKey .

QCoapPrivateKey:: ~QCoapPrivateKey ()

Releases any resources held by QCoapPrivateKey .

QSsl::KeyAlgorithm QCoapPrivateKey:: algorithm () const

Returns the key algorithm.

QSsl::EncodingFormat QCoapPrivateKey:: encodingFormat () const

Returns the encoding format of the key.

Qt::HANDLE QCoapPrivateKey:: handle () const

Returns a pointer to the native key handle.

bool QCoapPrivateKey:: isNull () const

返迴 true 若私鑰私鑰為 null,返迴 false 否則。

QByteArray QCoapPrivateKey:: key () const

Returns the encoded private key.

QByteArray QCoapPrivateKey:: passPhrase () const

返迴密鑰的口令短語。

void QCoapPrivateKey:: swap ( QCoapPrivateKey & other )

Swaps this private key with other 。此操作很快且從不失敗。