
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQSslKey class provides an interface for private and public keys.More...
| Header: | #include <QSslKey> |
| Since: | Qt 4.3 |
Note: All functions in this class arereentrant.
| QSslKey() | |
| QSslKey(const QByteArray & encoded, QSsl::KeyAlgorithm algorithm, QSsl::EncodingFormat encoding = QSsl::Pem, QSsl::KeyType type = QSsl::PrivateKey, const QByteArray & passPhrase = QByteArray()) | |
| QSslKey(QIODevice * device, QSsl::KeyAlgorithm algorithm, QSsl::EncodingFormat encoding = QSsl::Pem, QSsl::KeyType type = QSsl::PrivateKey, const QByteArray & passPhrase = QByteArray()) | |
| QSslKey(const QSslKey & other) | |
| ~QSslKey() | |
| QSsl::KeyAlgorithm | algorithm() const |
| void | clear() |
| Qt::HANDLE | handle() const |
| bool | isNull() const |
| int | length() const |
| QByteArray | toDer(const QByteArray & passPhrase = QByteArray()) const |
| QByteArray | toPem(const QByteArray & passPhrase = QByteArray()) const |
| QSsl::KeyType | type() const |
| bool | operator!=(const QSslKey & other) const |
| QSslKey & | operator=(const QSslKey & other) |
| bool | operator==(const QSslKey & other) const |
TheQSslKey class provides an interface for private and public keys.
QSslKey provides a simple API for managing keys.
See alsoQSslSocket,QSslCertificate, andQSslCipher.
Constructs a null key.
See alsoisNull().
Constructs aQSslKey by decoding the string in the byte arrayencoded using a specifiedalgorithm andencoding format. If the encoded key is encrypted,passPhrase is used to decrypt it.type specifies whether the key is public or private.
After construction, useisNull() to check ifencoded contained a valid key.
Constructs aQSslKey by reading and decoding data from adevice using a specifiedalgorithm andencoding format. If the encoded key is encrypted,passPhrase is used to decrypt it.type specifies whether the key is public or private.
After construction, useisNull() to check ifdevice provided a valid key.
Constructs an identical copy ofother.
Destroys theQSslKey object.
Returns the key algorithm.
Clears the contents of this key, making it a null key.
See alsoisNull().
Returns a pointer to the native key handle, if it is available; otherwise a null pointer is returned.
You can use this handle together with the native API to access extended information about the key.
Warning: Use of this function has a high probability of being non-portable, and its return value may vary across platforms, and between minor Qt releases.
Returns true if this is a null key; otherwise false.
See alsoclear().
Returns the length of the key in bits, or -1 if the key is null.
Returns the key in DER encoding. The result is encrypted withpassPhrase if the key is a private key andpassPhrase is non-empty.
Returns the key in PEM encoding. The result is encrypted withpassPhrase if the key is a private key andpassPhrase is non-empty.
Returns the type of the key (i.e., PublicKey or PrivateKey).
Returns true if this key is not equal to keyother; otherwise returns false.
Copies the contents ofother into this key, making the two keys identical.
Returns a reference to thisQSslKey.
Returns true if this key is equal toother; otherwise returns false.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.