CopperSpice API  1.7.2
QSslEllipticCurve Class Reference

Represents an elliptic curve for use by elliptic-curve cipher algorithms. More...

Public Methods

constexpr QSslEllipticCurve ()

bool isTlsNamedCurve () const

constexpr bool isValid () const

QString longName () const

QString shortName () const

Static Public Methods

static QSslEllipticCurve fromLongName (const QString &name)

static QSslEllipticCurve fromShortName (const QString &name)

Friends

constexpr friend bool operator== (QSslEllipticCurve lhs, QSslEllipticCurve rhs)

uint qHash (QSslEllipticCurve curve, uint seed)

Related Functions

These are not member functions

bool operator!= (QSslEllipticCurve lhs, QSslEllipticCurve rhs)

QDebug operator<< (QDebug debug, QSslEllipticCurve curve)

Detailed Description

The class QSslEllipticCurve represents an elliptic curve for use by elliptic-curve cipher algorithms.

Elliptic curves can be constructed from a "short name" (SN) (fromShortName()), and by a call to QSslConfiguration::supportedEllipticCurves().

QSslEllipticCurve instances can be compared for equality and can be used as keys in QHash and QSet. They can not be used as key in a QMap since they can not be compared for less than.

Constructor & Destructor Documentation

 constexpr QSslEllipticCurve::QSslEllipticCurve ( )
inlineconstexpr

Constructs an invalid elliptic curve.

isValid(), QSslConfiguration::supportedEllipticCurves()

Method Documentation

 QSslEllipticCurve QSslEllipticCurve::fromLongName ( const QString & name )
static

Returns an QSslEllipticCurve instance representing the named curve name. The name is a long name for the curve, whose exact spelling depends on the SSL implementation.

If the given name is not supported, returns an invalid QSslEllipticCurve instance.

Note
The OpenSSL implementation of this function treats the name case-sensitively.
longName()
 QSslEllipticCurve QSslEllipticCurve::fromShortName ( const QString & name )
static

Returns an QSslEllipticCurve instance representing the named curve name. The name is the conventional short name for the curve, as represented by RFC 4492 or as NIST short names. The actual set of recognized names depends on the SSL implementation.

If the given name is not supported returns an invalid QSslEllipticCurve instance.

Note
The OpenSSL implementation of this function treats the name case-sensitively.
shortName()
 bool QSslEllipticCurve::isTlsNamedCurve ( ) const

Returns true if this elliptic curve is one of the named curves that can be used in the key exchange when using an elliptic curve cipher with TLS, false otherwise.

 constexpr bool QSslEllipticCurve::isValid ( ) const
inlineconstexpr

Returns true if this elliptic curve is a valid curve, false otherwise.

 QString QSslEllipticCurve::longName ( ) const

Returns the conventional long name for this curve. If this curve is invalid, returns an empty string.

shortName()
 QString QSslEllipticCurve::shortName ( ) const

Returns the conventional short name for this curve. If this curve is invalid, returns an empty string.

longName()

Friends And Related Function Documentation

 bool operator!= ( QSslEllipticCurve lhs, QSslEllipticCurve rhs )
related

Returns true if the curve lhs represents a different curve than rhs, false otherwise.

 QDebug operator<< ( QDebug debug, QSslEllipticCurve curve )
related

Writes the elliptic curve curve into the debug object debug for debugging purposes.

 bool operator== ( QSslEllipticCurve lhs, QSslEllipticCurve rhs )
friend

Returns true if the curve lhs represents the same curve of rhs;

 uint qHash ( QSslEllipticCurve curve, uint seed = 0 )
friend

Returns an hash value for the curve curve, using seed to seed the calculation.