QCA::DHPublicKey Class Reference
QCA user API

`#include <QtCrypto>`

Collaboration diagram for QCA::DHPublicKey:
[legend]

## Public Member Functions

| DHPublicKey ()
| DHPublicKey (const DHPrivateKey &k)
| DHPublicKey (const DLGroup &domain, const BigInteger &y, const QString &provider=QString())
DLGroup | domain () const
BigInteger | y () const
Public Member Functions inherited from QCA::PublicKey
bool | canDecrypt () const
bool | canEncrypt () const
bool | canVerify () const
bool | decrypt (const SecureArray &in, SecureArray *out, EncryptionAlgorithm alg)
SecureArray | encrypt (const SecureArray &a, EncryptionAlgorithm alg)
int | maximumEncryptSize (EncryptionAlgorithm alg) const
PublicKey & | operator= (const PublicKey &from)
| PublicKey ()
| PublicKey (const PrivateKey &k)
| PublicKey (const PublicKey &from)
| PublicKey (const QString &fileName)
void | startVerify (SignatureAlgorithm alg, SignatureFormat format=DefaultFormat)
QByteArray | toDER () const
DHPublicKey | toDH () const
DSAPublicKey | toDSA () const
QString | toPEM () const
bool | toPEMFile (const QString &fileName) const
RSAPublicKey | toRSA () const
void | update (const MemoryRegion &a)
bool | validSignature (const QByteArray &sig)
bool | verifyMessage (const MemoryRegion &a, const QByteArray &sig, SignatureAlgorithm alg, SignatureFormat format=DefaultFormat)
Public Member Functions inherited from QCA::PKey
int | bitSize () const
bool | canExport () const
bool | canKeyAgree () const
bool | isDH () const
bool | isDSA () const
bool | isNull () const
bool | isPrivate () const
bool | isPublic () const
bool | isRSA () const
bool | operator!= (const PKey &a) const
PKey & | operator= (const PKey &from)
bool | operator== (const PKey &a) const
| PKey ()
| PKey (const PKey &from)
PrivateKey | toPrivateKey () const
PublicKey | toPublicKey () const
Type | type () const
Public Member Functions inherited from QCA::Algorithm
| Algorithm (const Algorithm &from)
void | change (const QString &type, const QString &provider)
void | change (Provider::Context *c)
Provider::Context * | context ()
const Provider::Context * | context () const
Algorithm & | operator= (const Algorithm &from)
Provider * | provider () const
Provider::Context * | takeContext ()
QString | type () const

## Additional Inherited Members

Public Types inherited from QCA::PKey
enum | Type { RSA , DSA , DH }
Static Public Member Functions inherited from QCA::PublicKey
static PublicKey | fromDER (const QByteArray &a, ConvertResult *result=nullptr, const QString &provider=QString())
static PublicKey | fromPEM (const QString &s, ConvertResult *result=nullptr, const QString &provider=QString())
static PublicKey | fromPEMFile (const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
Static Public Member Functions inherited from QCA::PKey
static QList< Type > | supportedIOTypes (const QString &provider=QString())
static QList< Type > | supportedTypes (const QString &provider=QString())
Protected Member Functions inherited from QCA::PublicKey
| PublicKey (const QString &type, const QString &provider)
Protected Member Functions inherited from QCA::PKey
| PKey (const QString &type, const QString &provider)
void | set (const PKey &k)
DHPrivateKey | toDHPrivateKey () const
DHPublicKey | toDHPublicKey () const
DSAPrivateKey | toDSAPrivateKey () const
DSAPublicKey | toDSAPublicKey () const
RSAPrivateKey | toRSAPrivateKey () const
RSAPublicKey | toRSAPublicKey () const
Protected Member Functions inherited from QCA::Algorithm
| Algorithm ()
| Algorithm (const QString &type, const QString &provider)

## Detailed Description

Diffie-Hellman Public Key.

## Constructor & Destructor Documentation

## DHPublicKey() [1/3]

QCA::DHPublicKey::DHPublicKey | ( |  | ) |

Create an empty Diffie-Hellman public key.

## DHPublicKey() [2/3]

QCA::DHPublicKey::DHPublicKey | ( | const DLGroup & | domain,
|  | const BigInteger & | y,
|  | const QString & | provider = QString() )

Create a Diffie-Hellman public key.

Parameters

  domain | the discrete logarithm group to use
  y | the public random value
  provider | the provider to use, if a specific provider is required

References domain(), QCA::Algorithm::provider(), and y().

## DHPublicKey() [3/3]

QCA::DHPublicKey::DHPublicKey | ( | const DHPrivateKey & | k | ) |

Create a Diffie-Hellman public key from a specified private key.

Parameters

  k | the Diffie-Hellman private key to use as the source

## Member Function Documentation

## domain()

DLGroup QCA::DHPublicKey::domain | ( |  | ) | const

The discrete logarithm group that is being used.

Referenced by DHPublicKey().

## y()

BigInteger QCA::DHPublicKey::y | ( |  | ) | const

The public random value associated with this key.

Referenced by DHPublicKey().

The documentation for this class was generated from the following file:

- qca_publickey.h