Qt:Документация 4.3.2/qsslkey
Материал из Wiki.crossplatform.ru
Внимание: Актуальная версия перевода документации находится здесь |
__NOTOC__
Главная · Все классы · Основные классы · Классы по группам · Модули · Функции |
[править] QSslKey Class Reference
[модуль QtNetwork ]
The QSslKey class provides an interface for private and public keys. Далее...
#include <QSslKey>
Примечание: все функции в этом классе реентерабельны.
Класс был добавлен в Qt 4.3.
[править] Открытые функции
- 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
[править] Подробное описание
The QSslKey class provides an interface for private and public keys.
QSslKey provides a simple API for managing keys.
See also QSslSocket, QSslCertificate, and QSslCipher.
[править] Описание функций-членов
[править] QSslKey::QSslKey ()
Constructs a null key.
Смотрите также isNull().
[править] QSslKey::QSslKey ( const QByteArray & encoded, QSsl::KeyAlgorithm algorithm, QSsl::EncodingFormat encoding = QSsl::Pem, QSsl::KeyType type = QSsl::PrivateKey, const QByteArray & passPhrase = QByteArray() )
Constructs a QSslKey by decoding the string in the byte array encoded using a specified algorithm and encoding format. If the encoded key is encrypted, passPhrase is used to decrypt it. type specifies whether the key is public or private.
After construction, use isNull() to check if encoded contained a valid key.
[править] QSslKey::QSslKey ( QIODevice * device, QSsl::KeyAlgorithm algorithm, QSsl::EncodingFormat encoding = QSsl::Pem, QSsl::KeyType type = QSsl::PrivateKey, const QByteArray & passPhrase = QByteArray() )
Constructs a QSslKey by reading and decoding data from a device using a specified algorithm and encoding format. If the encoded key is encrypted, passPhrase is used to decrypt it. type specifies whether the key is public or private.
After construction, use isNull() to check if device provided a valid key.
[править] QSslKey::QSslKey ( const QSslKey & other )
Constructs an identical copy of other.
[править] QSslKey::~QSslKey ()
Destroys the QSslKey object.
[править] QSsl::KeyAlgorithm QSslKey::algorithm () const
Returns the key algorithm.
[править] void QSslKey::clear ()
Clears the contents of this key, making it a null key.
Смотрите также isNull().
[править] Qt::HANDLE QSslKey::handle () const
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.
[править] bool QSslKey::isNull () const
Returns true if this is a null key; otherwise false.
See also clear().
[править] int QSslKey::length () const
Returns the length of the key in bits, or -1 if the key is null.
[править] QByteArray QSslKey::toDer ( const QByteArray & passPhrase = QByteArray() ) const
Returns the key in DER encoding. The result is encrypted with passPhrase if the key is a private key and passPhrase is non-empty.
[править] QByteArray QSslKey::toPem ( const QByteArray & passPhrase = QByteArray() ) const
Returns the key in PEM encoding. The result is encrypted with passPhrase if the key is a private key and passPhrase is non-empty.
[править] QSsl::KeyType QSslKey::type () const
Returns the type of the key (i.e., PublicKey or PrivateKey).
[править] bool QSslKey::operator!= ( const QSslKey & other ) const
Returns true if this key is not equal to key other; otherwise returns false.
[править] QSslKey & QSslKey::operator= ( const QSslKey & other )
Copies the contents of other into this key, making the two keys identical.
Returns a reference to this QSslKey.
[править] bool QSslKey::operator== ( const QSslKey & other ) const
Returns true if this key is equal to other; otherwise returns false.
Copyright © 2007 Trolltech | Trademarks | Qt 4.3.2
|