The QSslKey 类为私钥和公钥提供接口。 更多...
| 头: | #include <QSslKey> |
| Since: | 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 类为私钥和公钥提供接口。
QSslKey 提供用于管理密钥的简单 API。
另请参阅 QSslSocket , QSslCertificate ,和 QSslCipher .
构造 null 密钥。
另请参阅 isNull ().
构造 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.
在构造后,使用 isNull () 以校验是否 encoded contained a valid key.
构造 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.
在构造后,使用 isNull () 以校验是否 device 提供有效密钥。
Constructs an identical copy of other .
销毁 QSslKey 对象。
Returns the key algorithm.
Clears the contents of this key, making it a null key.
另请参阅 isNull ().
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.
警告: 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.
另请参阅 clear ().
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 with passPhrase if the key is a private key and passPhrase is non-empty.
Returns the key in PEM encoding. The result is encrypted with passPhrase if the key is a private key and passPhrase is non-empty.
返回密钥类型 (即:PublicKey 或 PrivateKey)。
Returns true if this key is not equal to key other ;否则返回 false。
Copies the contents of other into this key, making the two keys identical.
Returns a reference to this QSslKey .
Returns true if this key is equal to other ;否则返回 false。