QSslKey Class ReferenceThe QSslKey class provides an interface for private and public keys. More... #include <QSslKey> Note: All functions in this class are reentrant. This class was introduced in Qt 4.3. Public Functions
Detailed DescriptionThe QSslKey class provides an interface for private and public keys. QSslKey provides a simple API for managing keys. See also QSslSocket, QSslCertificate, and QSslCipher. Member Function DocumentationQSslKey::QSslKey ()Constructs a null key. See also 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 () constReturns the key algorithm. void QSslKey::clear ()Clears the contents of this key, making it a null key. See also isNull(). Qt::HANDLE QSslKey::handle () constReturns 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 () constReturns true if this is a null key; otherwise false. See also clear(). int QSslKey::length () constReturns the length of the key in bits, or -1 if the key is null. QByteArray QSslKey::toDer ( const QByteArray & passPhrase = QByteArray() ) constReturns 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() ) constReturns 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 () constReturns the type of the key (i.e., PublicKey or PrivateKey). bool QSslKey::operator!= ( const QSslKey & other ) constReturns 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 ) constReturns true if this key is equal to other; otherwise returns false. X
|
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |