IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QCoapPrivateKey Class

The QCoapPrivateKey class provides an interface for managing CoAP security keys.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QCoapPrivateKey Class

  • Header: QCoapPrivateKey

  • qmake: QT += coap

Detailed Description

A QCoapPrivateKey packages a private key used in negotiating CoAP connections securely. It holds the information required for authentication using pre-shared keys and X.509 certificates.

Member Function Documentation

 

QCoapPrivateKey::QCoapPrivateKey()

Constructs an empty instance of QCoapPrivateKey.

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 using the specified algorithm and encoding format.

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

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

Constructs a QCoapPrivateKey from a native key handle.

QCoapPrivateKey::QCoapPrivateKey(const QCoapPrivateKey &other)

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

QCoapPrivateKey::QCoapPrivateKey(QCoapPrivateKey &&other)

Move-constructs a QCoapPrivateKey, making it point to the same object as other was pointing to.

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

Returns true if the private key is null, returns false otherwise.

QByteArray QCoapPrivateKey::key() const

Returns the encoded private key.

QByteArray QCoapPrivateKey::passPhrase() const

Returns the passphrase for the key.

void QCoapPrivateKey::swap(QCoapPrivateKey &other)

Swaps this private key with other. This operation is very fast and never fails.

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.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+