int QSslKeyProto::length() const { QSslKey *item = qscriptvalue_cast<QSslKey*>(thisObject()); if (item) return item->length(); return 0; }
int CertificateDialogPrivate::keyLenght( const QSslKey &key ) const { switch( key.algorithm() ) { case QSsl::Dsa: return DSA_size( (DSA*)key.handle() ) * 8; case QSsl::Rsa: return RSA_size( (RSA*)key.handle() ) * 8; } return key.length(); }
QDebug operator<<(QDebug debug, const QSslKey &key) { debug << "QSslKey(" << (key.type() == QSsl::PublicKey ? "PublicKey" : "PrivateKey") << ", " << (key.algorithm() == QSsl::Rsa ? "RSA" : "DSA") << ", " << key.length() << ")"; return debug; }
QDebug operator<<(QDebug debug, const QSslKey &key) { QDebugStateSaver saver(debug); debug.resetFormat().nospace(); debug << "QSslKey(" << (key.type() == QSsl::PublicKey ? "PublicKey" : "PrivateKey") << ", " << (key.algorithm() == QSsl::Opaque ? "OPAQUE" : (key.algorithm() == QSsl::Rsa ? "RSA" : ((key.algorithm() == QSsl::Dsa) ? "DSA" : "EC"))) << ", " << key.length() << ')'; return debug; }
/*! Returns true if this key is equal to \a other; otherwise returns false. */ bool QSslKey::operator==(const QSslKey &other) const { if (isNull()) return other.isNull(); if (other.isNull()) return isNull(); if (algorithm() != other.algorithm()) return false; if (type() != other.type()) return false; if (length() != other.length()) return false; return toDer() == other.toDer(); }