QCA::Algorithm Class Reference
QCA user API

`#include <QtCrypto>`

## Public Member Functions

| 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

## Protected Member Functions

| Algorithm ()
| Algorithm (const QString &type, const QString &provider)

## Detailed Description

General superclass for an algorithm.

This is a fairly abstract class, mainly used for implementing the backend "provider" interface.

## Constructor & Destructor Documentation

## Algorithm() [1/3]

QCA::Algorithm::Algorithm | ( | const Algorithm & | from | ) |

Standard copy constructor.

Parameters

  from | the Algorithm to copy from

References Algorithm().

Referenced by Algorithm(), and operator=().

## Algorithm() [2/3]

QCA::Algorithm::Algorithm | ( |  | ) |

protected

Constructor for empty algorithm.

## Algorithm() [3/3]

QCA::Algorithm::Algorithm | ( | const QString & | type,
|  | const QString & | provider )

protected

Constructor of a particular algorithm.

Parameters

  type | the algorithm to construct
  provider | the name of a particular Provider

References provider(), and type().

## Member Function Documentation

## operator=()

Algorithm & QCA::Algorithm::operator= | ( | const Algorithm & | from | ) |

Assignment operator.

Parameters

  from | the Algorithm to copy state from

References Algorithm().

## type()

QString QCA::Algorithm::type | ( |  | ) | const

The name of the algorithm type.

Referenced by Algorithm(), change(), QCA::KeyDerivationFunction::KeyDerivationFunction(), and QCA::SecureMessageSystem::SecureMessageSystem().

## provider()

Provider * QCA::Algorithm::provider | ( |  | ) | const

The name of the provider.

Each algorithm is implemented by a provider. This allows you to figure out which provider is associated

Referenced by Algorithm(), QCA::CertificateRequest::canUseFormat(), QCA::Certificate::Certificate(), QCA::CertificateAuthority::CertificateAuthority(), QCA::CertificateRequest::CertificateRequest(), change(), QCA::Cipher::Cipher(), QCA::Cipher::Cipher(), QCA::CMS::CMS(), QCA::DHPrivateKey::DHPrivateKey(), QCA::DHPublicKey::DHPublicKey(), QCA::DSAPrivateKey::DSAPrivateKey(), QCA::DSAPublicKey::DSAPublicKey(), QCA::PGPKey::fromArray(), QCA::Certificate::fromDER(), QCA::CertificateRequest::fromDER(), QCA::CRL::fromDER(), QCA::PrivateKey::fromDER(), QCA::PublicKey::fromDER(), QCA::PGPKey::fromFile(), QCA::Certificate::fromPEM(), QCA::CertificateRequest::fromPEM(), QCA::CRL::fromPEM(), QCA::PrivateKey::fromPEM(), QCA::PublicKey::fromPEM(), QCA::Certificate::fromPEMFile(), QCA::CertificateRequest::fromPEMFile(), QCA::CRL::fromPEMFile(), QCA::PrivateKey::fromPEMFile(), QCA::PublicKey::fromPEMFile(), QCA::CertificateRequest::fromString(), QCA::PGPKey::fromString(), QCA::Hash::Hash(), QCA::HKDF::HKDF(), QCA::KeyDerivationFunction::KeyDerivationFunction(), QCA::MessageAuthenticationCode::MessageAuthenticationCode(), QCA::OpenPGP::OpenPGP(), QCA::PBKDF1::PBKDF1(), QCA::PBKDF2::PBKDF2(), QCA::PKey::PKey(), QCA::PrivateKey::PrivateKey(), QCA::PublicKey::PublicKey(), QCA::Random::Random(), QCA::RSAPrivateKey::RSAPrivateKey(), QCA::RSAPublicKey::RSAPublicKey(), QCA::SASL::SASL(), QCA::SecureMessageSystem::SecureMessageSystem(), QCA::PKey::supportedIOTypes(), QCA::PrivateKey::supportedPBEAlgorithms(), QCA::Cipher::supportedTypes(), QCA::Hash::supportedTypes(), QCA::MessageAuthenticationCode::supportedTypes(), QCA::PKey::supportedTypes(), QCA::TLS::TLS(), and QCA::TLS::TLS().

## context() [1/2]

Provider::Context * QCA::Algorithm::context | ( |  | ) |

The context associated with this algorithm

## context() [2/2]

const Provider::Context * QCA::Algorithm::context | ( |  | ) | const

The context associated with this algorithm

## change() [1/2]

void QCA::Algorithm::change | ( | Provider::Context * | c | ) |

Set the Provider for this algorithm

Parameters

  c | the context for the Provider to use

## change() [2/2]

void QCA::Algorithm::change | ( | const QString & | type,
|  | const QString & | provider )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters

  type | the name of the algorithm to use
  provider | the name of the preferred provider

References provider(), and type().

## takeContext()

Provider::Context * QCA::Algorithm::takeContext | ( |  | ) |

Take the Provider from this algorithm

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

- qca_core.h