• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

qca

QCA::PKeyBase

QCA::PKeyBase Class Reference
[QCA provider API]

Public key implementation provider base. More...

#include <QtCrypto>

Inheritance diagram for QCA::PKeyBase:
Inheritance graph
[legend]

List of all members.

Signals

void finished ()

Public Member Functions

 PKeyBase (Provider *p, const QString &type)
virtual int bits () const =0
virtual bool canExport () const =0
virtual void convertToPublic ()=0
virtual bool decrypt (const SecureArray &in, SecureArray *out, EncryptionAlgorithm alg)
virtual SymmetricKey deriveKey (const PKeyBase &theirs)
virtual SecureArray encrypt (const SecureArray &in, EncryptionAlgorithm alg)
virtual QByteArray endSign ()
virtual bool endVerify (const QByteArray &sig)
virtual bool isNull () const =0
virtual bool isPrivate () const =0
virtual int maximumEncryptSize (EncryptionAlgorithm alg) const
virtual void startSign (SignatureAlgorithm alg, SignatureFormat format)
virtual void startVerify (SignatureAlgorithm alg, SignatureFormat format)
virtual PKey::Type type () const =0
virtual void update (const MemoryRegion &in)

Detailed Description

Public key implementation provider base.

Note:
This class is part of the provider plugin interface and should not be used directly by applications. You probably want PKey, PublicKey, or PrivateKey instead.

Definition at line 436 of file qcaprovider.h.


Constructor & Destructor Documentation

QCA::PKeyBase::PKeyBase ( Provider *  p,
const QString &  type 
)

Standard constructor.

Parameters:
p the Provider associated with this context
type type of key provided by this context

Definition at line 940 of file qca_core.cpp.


Member Function Documentation

virtual int QCA::PKeyBase::bits (  )  const [pure virtual]

Returns the number of bits in the key.

virtual bool QCA::PKeyBase::canExport (  )  const [pure virtual]

Returns true if the components of this key are accessible and whether it can be serialized into an output format.

Private keys from a smart card device will often not be exportable.

virtual void QCA::PKeyBase::convertToPublic (  )  [pure virtual]

If the key is a private key, this function will convert it into a public key (all private key data includes the public data as well, which is why this is possible).

If the key is already a public key, then this function has no effect.

bool QCA::PKeyBase::decrypt ( const SecureArray &  in,
SecureArray *  out,
EncryptionAlgorithm  alg 
) [virtual]

Decrypt data.

Parameters:
in the input data to decrypt
out pointer to an array to store the plaintext result
alg the encryption algorithm used to generate the input data

Definition at line 955 of file qca_core.cpp.

SymmetricKey QCA::PKeyBase::deriveKey ( const PKeyBase &  theirs  )  [virtual]

Compute a symmetric key based on this private key and some other public key.

Essentially for Diffie-Hellman only.

Parameters:
theirs the other side (public key) to be used for key generation.

Definition at line 982 of file qca_core.cpp.

SecureArray QCA::PKeyBase::encrypt ( const SecureArray &  in,
EncryptionAlgorithm  alg 
) [virtual]

Encrypt data.

Parameters:
in the input data to encrypt
alg the encryption algorithm to use

Definition at line 950 of file qca_core.cpp.

QByteArray QCA::PKeyBase::endSign (  )  [virtual]

Complete a signing operation, and return the signature value.

If there is an error signing, an empty array is returned.

Definition at line 972 of file qca_core.cpp.

bool QCA::PKeyBase::endVerify ( const QByteArray &  sig  )  [virtual]

Complete a verify operation, and return true if successful.

If there is an error verifying, this function returns false.

Parameters:
sig the signature to verify with the input data

Definition at line 977 of file qca_core.cpp.

void QCA::PKeyBase::finished (  )  [signal]

Emitted when an asynchronous operation completes on this key.

Such operations will be documented that they emit this signal.

virtual bool QCA::PKeyBase::isNull (  )  const [pure virtual]

Returns true if this object is not valid.

This is the default state, and the object may also become this state if a conversion or generation function fails.

virtual bool QCA::PKeyBase::isPrivate (  )  const [pure virtual]

Returns true if this is a private key, otherwise false.

int QCA::PKeyBase::maximumEncryptSize ( EncryptionAlgorithm  alg  )  const [virtual]

Returns the maximum number of bytes that can be encrypted by this key.

Parameters:
alg the algorithm to be used for encryption

Definition at line 945 of file qca_core.cpp.

void QCA::PKeyBase::startSign ( SignatureAlgorithm  alg,
SignatureFormat  format 
) [virtual]

Begin a signing operation.

Parameters:
alg the signature algorithm to use
format the signature format to use

Definition at line 960 of file qca_core.cpp.

void QCA::PKeyBase::startVerify ( SignatureAlgorithm  alg,
SignatureFormat  format 
) [virtual]

Begin a verify operation.

Parameters:
alg the signature algorithm used by the input signature
format the signature format used by the input signature

Definition at line 964 of file qca_core.cpp.

virtual PKey::Type QCA::PKeyBase::type (  )  const [pure virtual]

Returns the type of public key.

void QCA::PKeyBase::update ( const MemoryRegion &  in  )  [virtual]

Process the plaintext input data for either signing or verifying, whichever operation is active.

Parameters:
in the input data to process

Definition at line 968 of file qca_core.cpp.


The documentation for this class was generated from the following files:
  • qcaprovider.h
  • qca_core.cpp

qca

Skip menu "qca"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal