QCA::DHPrivateKey

Search for usage in LXR

QCA::DHPrivateKey Class Reference

#include <QtCrypto>

Inheritance diagram for QCA::DHPrivateKey:

Public Member Functions

 DHPrivateKey ()
 
 DHPrivateKey (const DLGroup &domain, const BigInteger &y, const BigInteger &x, const QString &provider=QString())
 
DLGroup domain () const
 
BigInteger x () const
 
BigInteger y () const
 
- Public Member Functions inherited from QCA::PrivateKey
 PrivateKey ()
 
 PrivateKey (const PrivateKey &from)
 
 PrivateKey (const QString &fileName, const SecureArray &passphrase=SecureArray())
 
bool canDecrypt () const
 
bool canEncrypt () const
 
bool canSign () const
 
bool decrypt (const SecureArray &in, SecureArray *out, EncryptionAlgorithm alg)
 
SymmetricKey deriveKey (const PublicKey &theirs)
 
SecureArray encrypt (const SecureArray &a, EncryptionAlgorithm alg)
 
int maximumEncryptSize (EncryptionAlgorithm alg) const
 
PrivateKeyoperator= (const PrivateKey &from)
 
QByteArray signature ()
 
QByteArray signMessage (const MemoryRegion &a, SignatureAlgorithm alg, SignatureFormat format=DefaultFormat)
 
void startSign (SignatureAlgorithm alg, SignatureFormat format=DefaultFormat)
 
SecureArray toDER (const SecureArray &passphrase=SecureArray(), PBEAlgorithm pbe=PBEDefault) const
 
DHPrivateKey toDH () const
 
DSAPrivateKey toDSA () const
 
QString toPEM (const SecureArray &passphrase=SecureArray(), PBEAlgorithm pbe=PBEDefault) const
 
bool toPEMFile (const QString &fileName, const SecureArray &passphrase=SecureArray(), PBEAlgorithm pbe=PBEDefault) const
 
RSAPrivateKey toRSA () const
 
void update (const MemoryRegion &a)
 
- Public Member Functions inherited from QCA::PKey
 PKey ()
 
 PKey (const PKey &from)
 
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
 
PKeyoperator= (const PKey &from)
 
bool operator== (const PKey &a) const
 
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::Contextcontext ()
 
const Provider::Contextcontext () const
 
Algorithmoperator= (const Algorithm &from)
 
Providerprovider () const
 
Provider::ContexttakeContext ()
 
QString type () const
 

Additional Inherited Members

- Public Types inherited from QCA::PKey
enum  Type { RSA , DSA , DH }
 
- Static Public Member Functions inherited from QCA::PrivateKey
static PrivateKey fromDER (const SecureArray &a, const SecureArray &passphrase=SecureArray(), ConvertResult *result=nullptr, const QString &provider=QString())
 
static PrivateKey fromPEM (const QString &s, const SecureArray &passphrase=SecureArray(), ConvertResult *result=nullptr, const QString &provider=QString())
 
static PrivateKey fromPEMFile (const QString &fileName, const SecureArray &passphrase=SecureArray(), ConvertResult *result=nullptr, const QString &provider=QString())
 
static QList< PBEAlgorithmsupportedPBEAlgorithms (const QString &provider=QString())
 
- Static Public Member Functions inherited from QCA::PKey
static QList< TypesupportedIOTypes (const QString &provider=QString())
 
static QList< TypesupportedTypes (const QString &provider=QString())
 
- Protected Member Functions inherited from QCA::PrivateKey
 PrivateKey (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 Private Key.

Definition at line 1525 of file qca_publickey.h.

Constructor & Destructor Documentation

◆ DHPrivateKey() [1/2]

QCA::DHPrivateKey::DHPrivateKey ( )

Create an empty Diffie-Hellman private key.

◆ DHPrivateKey() [2/2]

QCA::DHPrivateKey::DHPrivateKey ( const DLGroup & domain,
const BigInteger & y,
const BigInteger & x,
const QString & provider = QString() )

Create a Diffie-Hellman private key.

Parameters
domainthe discrete logarithm group to use
ythe public random value
xthe private random value
providerthe provider to use, if a particular provider is required

Member Function Documentation

◆ domain()

DLGroup QCA::DHPrivateKey::domain ( ) const

The discrete logarithm group that is being used.

◆ x()

BigInteger QCA::DHPrivateKey::x ( ) const

The private random value associated with this key.

◆ y()

BigInteger QCA::DHPrivateKey::y ( ) const

The public random value associated with this key.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.