qca_core.h
Go to the documentation of this file.
/*
* qca_core.h - Qt Cryptographic Architecture
* Copyright (C) 2003-2007 Justin Karneges <justin@affinix.com>
* Copyright (C) 2004,2005 Brad Hards <bradh@frogmouth.net>
* Copyright (C) 2014-2016 Ivan Romanov <drizt@land.ru>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef QCA_CORE_H
#define QCA_CORE_H
#include "qca_export.h"
#include "qca_support.h"
#include "qca_tools.h"
#include "qca_version.h"
#include <QList>
#include <QSharedData>
#include <QSharedDataPointer>
#include <QString>
#include <QStringList>
QCA_EXPORT int qcaVersion();
QCA_EXPORT const char *qcaVersionStr();
QCA_EXPORT int qcaMajorVersion();
QCA_EXPORT int qcaMinorVersion();
QCA_EXPORT int qcaPatchVersion();
namespace QCA {
class Provider;
class Random;
class CertificateCollection;
class Global;
class KeyStore;
class KeyStoreEntry;
class KeyStoreInfo;
class KeyStoreManager;
class Logger;
typedef QList<Provider *> ProviderList;
enum MemoryMode
{
Practical,
Locking,
LockingKeepPrivileges
};
enum Direction
{
Encode,
Decode
};
QCA_EXPORT void init();
QCA_EXPORT void init(MemoryMode m, int prealloc);
QCA_EXPORT void deinit();
QCA_EXPORT bool haveSecureMemory();
QCA_EXPORT bool haveSecureRandom();
QCA_EXPORT bool isSupported(const char *features, const QString &provider = QString());
QCA_EXPORT bool isSupported(const QStringList &features, const QString &provider = QString());
QCA_EXPORT QStringList supportedFeatures();
QCA_EXPORT QStringList defaultFeatures();
QCA_EXPORT bool insertProvider(Provider *p, int priority = 0);
QCA_EXPORT bool unloadProvider(const QString &name);
QCA_EXPORT void setProviderPriority(const QString &name, int priority);
QCA_EXPORT int providerPriority(const QString &name);
QCA_EXPORT ProviderList providers();
QCA_EXPORT Provider *findProvider(const QString &name);
QCA_EXPORT Provider *defaultProvider();
QCA_EXPORT QStringList pluginPaths();
QCA_EXPORT void scanForPlugins();
QCA_EXPORT void unloadAllPlugins();
QCA_EXPORT QString pluginDiagnosticText();
QCA_EXPORT void clearPluginDiagnosticText();
QCA_EXPORT void appendPluginDiagnosticText(const QString &text);
QCA_EXPORT void setProperty(const QString &name, const QVariant &value);
QCA_EXPORT QVariant getProperty(const QString &name);
QCA_EXPORT void setProviderConfig(const QString &name, const QVariantMap &config);
QCA_EXPORT QVariantMap getProviderConfig(const QString &name);
QCA_EXPORT void saveProviderConfig(const QString &name);
QCA_EXPORT QString globalRandomProvider();
QCA_EXPORT void setGlobalRandomProvider(const QString &provider);
QCA_EXPORT Logger *logger();
#define QCA_logTextMessage(message, severity) \
do { \
QCA::Logger::Severity s = severity; \
QCA::Logger *l = QCA::logger(); \
if (s <= l->level()) { \
l->logTextMessage(message, s); \
} \
} while (false)
#define QCA_logBinaryMessage(blob, severity) \
do { \
QCA::Logger::Severity s = severity; \
QCA::Logger *l = QCA::logger(); \
if (s <= l->level()) { \
l->logBinaryMessage(blob, s); \
} \
} while (false)
QCA_EXPORT bool haveSystemStore();
QCA_EXPORT CertificateCollection systemStore();
QCA_EXPORT QString appName();
QCA_EXPORT void setAppName(const QString &name);
QCA_EXPORT QString arrayToHex(const QByteArray &array);
QCA_EXPORT QByteArray hexToArray(const QString &hexString);
QCA_EXPORT QString arrayToBase64(const QByteArray &array);
QCA_EXPORT QByteArray base64ToArray(const QString &base64String);
class QCA_EXPORT Initializer
{
public:
explicit Initializer(MemoryMode m = Practical, int prealloc = 64);
~Initializer();
Initializer(const Initializer &) = delete;
Initializer &operator=(const Initializer &) = delete;
};
class QCA_EXPORT KeyLength
{
public:
KeyLength(int min, int max, int multiple)
: _min(min)
, _max(max)
, _multiple(multiple)
{
}
int minimum() const
{
return _min;
}
int maximum() const
{
return _max;
}
int multiple() const
{
return _multiple;
}
private:
const int _min, _max, _multiple;
};
class QCA_EXPORT Provider
{
public:
virtual ~Provider();
class Context;
virtual void init();
virtual void deinit();
virtual int version() const;
virtual int qcaVersion() const = 0;
virtual QString name() const = 0;
virtual QStringList features() const = 0;
virtual QString credit() const;
virtual Context *createContext(const QString &type) = 0;
virtual QVariantMap defaultConfig() const;
virtual void configChanged(const QVariantMap &config);
};
class QCA_EXPORT Provider::Context : public QObject
{
Q_OBJECT
public:
~Context() override;
Provider *provider() const;
QString type() const;
virtual Context *clone() const = 0;
bool sameProvider(const Context *c) const;
protected:
Context(Provider *parent, const QString &type);
Context(const Context &from);
private:
// disable assignment
Context &operator=(const Context &from);
Provider *_provider;
QString _type;
};
class QCA_EXPORT BasicContext : public Provider::Context
{
Q_OBJECT
public:
~BasicContext() override;
protected:
BasicContext(Provider *parent, const QString &type);
BasicContext(const BasicContext &from);
private:
// disable assignment
BasicContext &operator=(const BasicContext &from);
};
class QCA_EXPORT BufferedComputation
{
public:
virtual ~BufferedComputation();
virtual void clear() = 0;
virtual void update(const MemoryRegion &a) = 0;
virtual MemoryRegion final() = 0;
MemoryRegion process(const MemoryRegion &a);
};
class QCA_EXPORT Filter
{
public:
virtual ~Filter();
virtual void clear() = 0;
virtual MemoryRegion update(const MemoryRegion &a) = 0;
virtual MemoryRegion final() = 0;
virtual bool ok() const = 0;
MemoryRegion process(const MemoryRegion &a);
};
class QCA_EXPORT Algorithm
{
public:
Algorithm(const Algorithm &from);
virtual ~Algorithm();
Algorithm &operator=(const Algorithm &from);
QString type() const;
Provider *provider() const;
// Note: The next five functions are not public!
Provider::Context *context();
const Provider::Context *context() const;
void change(Provider::Context *c);
void change(const QString &type, const QString &provider);
Provider::Context *takeContext();
protected:
Algorithm();
Algorithm(const QString &type, const QString &provider);
private:
class Private;
QSharedDataPointer<Private> d;
};
class QCA_EXPORT SymmetricKey : public SecureArray
{
public:
SymmetricKey();
SymmetricKey(int size);
SymmetricKey(const SecureArray &a);
SymmetricKey(const QByteArray &a);
bool isWeakDESKey();
};
class QCA_EXPORT InitializationVector : public SecureArray
{
public:
InitializationVector();
InitializationVector(int size);
InitializationVector(const SecureArray &a);
InitializationVector(const QByteArray &a);
};
class QCA_EXPORT AuthTag : public SecureArray
{
public:
AuthTag();
AuthTag(int size);
AuthTag(const SecureArray &a);
AuthTag(const QByteArray &a);
};
class QCA_EXPORT Event
{
public:
enum Type
{
Password,
Token
};
enum Source
{
KeyStore,
Data
};
enum PasswordStyle
{
StylePassword,
StylePassphrase,
StylePIN
};
Event();
Event(const Event &from);
~Event();
Event &operator=(const Event &from);
bool isNull() const;
Type type() const;
Source source() const;
PasswordStyle passwordStyle() const;
KeyStoreInfo keyStoreInfo() const;
KeyStoreEntry keyStoreEntry() const;
QString fileName() const;
void *ptr() const;
void setPasswordKeyStore(PasswordStyle pstyle,
const KeyStoreInfo &keyStoreInfo,
const KeyStoreEntry &keyStoreEntry,
void *ptr);
void setPasswordData(PasswordStyle pstyle, const QString &fileName, void *ptr);
void setToken(const KeyStoreInfo &keyStoreInfo, const KeyStoreEntry &keyStoreEntry, void *ptr);
private:
class Private;
QSharedDataPointer<Private> d;
};
class QCA_EXPORT EventHandler : public QObject
{
Q_OBJECT
public:
EventHandler(QObject *parent = nullptr);
~EventHandler() override;
void start();
void submitPassword(int id, const SecureArray &password);
void tokenOkay(int id);
void reject(int id);
Q_SIGNALS:
void eventReady(int id, const QCA::Event &context);
private:
Q_DISABLE_COPY(EventHandler)
class Private;
friend class Private;
Private *d;
};
class QCA_EXPORT PasswordAsker : public QObject
{
Q_OBJECT
public:
PasswordAsker(QObject *parent = nullptr);
~PasswordAsker() override;
void
ask(Event::PasswordStyle pstyle, const KeyStoreInfo &keyStoreInfo, const KeyStoreEntry &keyStoreEntry, void *ptr);
void ask(Event::PasswordStyle pstyle, const QString &fileName, void *ptr);
void cancel();
void waitForResponse();
bool accepted() const;
SecureArray password() const;
Q_SIGNALS:
void responseReady();
private:
Q_DISABLE_COPY(PasswordAsker)
class Private;
friend class Private;
Private *d;
};
class QCA_EXPORT TokenAsker : public QObject
{
Q_OBJECT
public:
TokenAsker(QObject *parent = nullptr);
~TokenAsker() override;
void ask(const KeyStoreInfo &keyStoreInfo, const KeyStoreEntry &keyStoreEntry, void *ptr);
void cancel();
void waitForResponse();
bool accepted() const;
Q_SIGNALS:
void responseReady();
private:
Q_DISABLE_COPY(TokenAsker)
class Private;
friend class Private;
Private *d;
};
}
#endif
QCA::Algorithm::type
QString type() const
The name of the algorithm type.
QCA::Algorithm::Algorithm
Algorithm()
Constructor for empty algorithm.
QCA::Algorithm::Algorithm
Algorithm(const QString &type, const QString &provider)
Constructor of a particular algorithm.
QCA::Algorithm::change
void change(Provider::Context *c)
QCA::Algorithm::provider
Provider * provider() const
The name of the provider.
QCA::Algorithm::change
void change(const QString &type, const QString &provider)
QCA::Algorithm::Algorithm
Algorithm(const Algorithm &from)
Standard copy constructor.
QCA::Algorithm::takeContext
Provider::Context * takeContext()
QCA::Algorithm::context
const Provider::Context * context() const
QCA::Algorithm::operator=
Algorithm & operator=(const Algorithm &from)
Assignment operator.
QCA::Algorithm::context
Provider::Context * context()
QCA::AuthTag::AuthTag
AuthTag(const QByteArray &a)
Construct an authentication tag from a provided byte array.
QCA::AuthTag::AuthTag
AuthTag(const SecureArray &a)
Construct an authentication tag from a provided byte array.
QCA::AuthTag::AuthTag
AuthTag()
Construct an empty authentication tag.
QCA::AuthTag::AuthTag
AuthTag(int size)
Construct an empty authentication tag of the specified size.
QCA::BasicContext::BasicContext
BasicContext(Provider *parent, const QString &type)
Standard constructor.
QCA::BasicContext::BasicContext
BasicContext(const BasicContext &from)
Copy constructor.
QCA::BufferedComputation
General superclass for buffered computation algorithms.
Definition qca_core.h:1052
QCA::BufferedComputation::clear
virtual void clear()=0
Reset the internal state.
QCA::BufferedComputation::process
MemoryRegion process(const MemoryRegion &a)
Perform an "all in one" update, returning the result.
QCA::BufferedComputation::update
virtual void update(const MemoryRegion &a)=0
Update the internal state with a byte array.
QCA::CertificateCollection
Bundle of Certificates and CRLs.
Definition qca_cert.h:1929
QCA::EventHandler::EventHandler
EventHandler(QObject *parent=nullptr)
Constructor.
QCA::EventHandler::submitPassword
void submitPassword(int id, const SecureArray &password)
function to call to return the user provided password, passphrase or PIN.
QCA::EventHandler::eventReady
void eventReady(int id, const QCA::Event &context)
signal emitted when an Event requires attention.
QCA::EventHandler::reject
void reject(int id)
function to call to indicate that the user declined to provide a password, passphrase,...
QCA::EventHandler::tokenOkay
void tokenOkay(int id)
function to call to indicate that the token has been inserted by the user.
QCA::EventHandler::start
void start()
mandatory function to call after connecting the signal to a slot in your application specific passwor...
QCA::Event
An asynchronous event.
Definition qca_core.h:1391
QCA::Event::Source
Source
Source of the event
Definition qca_core.h:1417
QCA::Event::Data
@ Data
File or bytearray generated the event.
Definition qca_core.h:1419
QCA::Event::KeyStore
@ KeyStore
KeyStore generated the event.
Definition qca_core.h:1418
QCA::Event::~Event
~Event()
Destructor.
QCA::Event::Event
Event(const Event &from)
Copy constructor.
QCA::Event::fileName
QString fileName() const
Name or other identifier for the file or byte array associated with this event.
QCA::Event::passwordStyle
PasswordStyle passwordStyle() const
the style of password required.
QCA::Event::type
Type type() const
the Type of this event
QCA::Event::setPasswordKeyStore
void setPasswordKeyStore(PasswordStyle pstyle, const KeyStoreInfo &keyStoreInfo, const KeyStoreEntry &keyStoreEntry, void *ptr)
Set the values for this Event.
QCA::Event::setToken
void setToken(const KeyStoreInfo &keyStoreInfo, const KeyStoreEntry &keyStoreEntry, void *ptr)
Set the values for this Event.
QCA::Event::keyStoreEntry
KeyStoreEntry keyStoreEntry() const
The KeyStoreEntry associated with this event.
QCA::Event::ptr
void * ptr() const
opaque data
QCA::Event::keyStoreInfo
KeyStoreInfo keyStoreInfo() const
The info of the KeyStore associated with this event.
QCA::Event::isNull
bool isNull() const
test if this event has been setup correctly
QCA::Event::source
Source source() const
the Source of this event
QCA::Event::Type
Type
Type of event
Definition qca_core.h:1399
QCA::Event::Password
@ Password
Asking for a password, PIN or passphrase.
Definition qca_core.h:1400
QCA::Event::Token
@ Token
Asking for a token.
Definition qca_core.h:1401
QCA::Event::Event
Event()
Constructor.
QCA::Event::PasswordStyle
PasswordStyle
password variation
Definition qca_core.h:1431
QCA::Event::StylePIN
@ StylePIN
User should be prompted for a "PIN".
Definition qca_core.h:1434
QCA::Event::StylePassphrase
@ StylePassphrase
User should be prompted for a "Passphrase".
Definition qca_core.h:1433
QCA::Event::StylePassword
@ StylePassword
User should be prompted for a "Password".
Definition qca_core.h:1432
QCA::Event::setPasswordData
void setPasswordData(PasswordStyle pstyle, const QString &fileName, void *ptr)
Set the values for this Event.
QCA::Event::operator=
Event & operator=(const Event &from)
Assignment operator.
QCA::Filter
General superclass for filtering transformation algorithms.
Definition qca_core.h:1108
QCA::Filter::process
MemoryRegion process(const MemoryRegion &a)
Perform an "all in one" update, returning the result.
QCA::Filter::ok
virtual bool ok() const =0
Test if an update() or final() call succeeded.
QCA::Filter::update
virtual MemoryRegion update(const MemoryRegion &a)=0
Process more data, returning the corresponding filtered version of the data.
QCA::Filter::clear
virtual void clear()=0
Reset the internal state.
QCA::InitializationVector::InitializationVector
InitializationVector(int size)
Construct an initialization vector of the specified size.
QCA::InitializationVector::InitializationVector
InitializationVector(const QByteArray &a)
Construct an initialization vector from a provided byte array.
QCA::InitializationVector::InitializationVector
InitializationVector(const SecureArray &a)
Construct an initialization vector from a provided byte array.
QCA::InitializationVector::InitializationVector
InitializationVector()
Construct an empty (zero length) initialization vector.
QCA::Initializer::Initializer
Initializer(MemoryMode m=Practical, int prealloc=64)
Standard constructor.
QCA::KeyLength::KeyLength
KeyLength(int min, int max, int multiple)
Construct a KeyLength object.
Definition qca_core.h:711
QCA::KeyLength::minimum
int minimum() const
Obtain the minimum length for the key, in bytes.
Definition qca_core.h:721
QCA::KeyLength::multiple
int multiple() const
Return the number of bytes that the key must be a multiple of.
Definition qca_core.h:740
QCA::KeyLength::maximum
int maximum() const
Obtain the maximum length for the key, in bytes.
Definition qca_core.h:729
QCA::KeyStoreEntry
Single entry in a KeyStore.
Definition qca_keystore.h:141
QCA::KeyStoreInfo
Key store information, outside of a KeyStore object.
Definition qca_keystore.h:624
QCA::Logger
A simple logging system.
Definition qca_support.h:963
QCA::MemoryRegion
Array of bytes that may be optionally secured.
Definition qca_tools.h:91
QCA::PasswordAsker::ask
void ask(Event::PasswordStyle pstyle, const QString &fileName, void *ptr)
queue a password / passphrase request associated with a file
QCA::PasswordAsker::responseReady
void responseReady()
Emitted when the asker process has been completed.
QCA::PasswordAsker::waitForResponse
void waitForResponse()
Block until the password / passphrase request is completed.
QCA::PasswordAsker::PasswordAsker
PasswordAsker(QObject *parent=nullptr)
Construct a new asker.
QCA::PasswordAsker::cancel
void cancel()
Cancel the pending password / passphrase request.
QCA::PasswordAsker::accepted
bool accepted() const
Determine whether the password / passphrase was accepted or not.
QCA::PasswordAsker::ask
void ask(Event::PasswordStyle pstyle, const KeyStoreInfo &keyStoreInfo, const KeyStoreEntry &keyStoreEntry, void *ptr)
queue a password / passphrase request associated with a key store
QCA::PasswordAsker::password
SecureArray password() const
The password / passphrase / PIN provided by the user in response to the asker request.
QCA::Provider::Context
Internal context class used for the plugin.
Definition qca_core.h:940
QCA::Provider::Context::Context
Context(Provider *parent, const QString &type)
Standard constructor.
QCA::Provider::Context::sameProvider
bool sameProvider(const Context *c) const
Test if two Contexts have the same Provider.
QCA::Provider::Context::provider
Provider * provider() const
The Provider associated with this Context.
QCA::Provider::Context::type
QString type() const
The type of context, as passed to the constructor.
QCA::Provider::Context::clone
virtual Context * clone() const =0
Create a duplicate of this Context.
QCA::Provider::Context::Context
Context(const Context &from)
Copy constructor.
QCA::Provider
Algorithm provider.
Definition qca_core.h:765
QCA::Provider::qcaVersion
virtual int qcaVersion() const =0
Target QCA version for the provider.
QCA::Provider::init
virtual void init()
Initialisation routine.
QCA::Provider::features
virtual QStringList features() const =0
The capabilities (algorithms) of the provider.
QCA::Provider::credit
virtual QString credit() const
Optional credit text for the provider.
QCA::Provider::createContext
virtual Context * createContext(const QString &type)=0
Routine to create a plugin context.
QCA::Provider::defaultConfig
virtual QVariantMap defaultConfig() const
Method to set up the default configuration options.
QCA::Provider::deinit
virtual void deinit()
Deinitialisation routine.
QCA::Provider::configChanged
virtual void configChanged(const QVariantMap &config)
Method to set the configuration options.
QCA::Provider::name
virtual QString name() const =0
The name of the provider.
QCA::Provider::version
virtual int version() const
Version number of the plugin.
QCA::SecureArray
Secure array of bytes.
Definition qca_tools.h:317
QCA::SecureArray::size
int size() const
Returns the number of bytes in the array.
QCA::SecureArray::SecureArray
SecureArray()
Construct a secure byte array, zero length.
QCA::SymmetricKey::SymmetricKey
SymmetricKey(const SecureArray &a)
Construct a key from a provided byte array.
QCA::SymmetricKey::SymmetricKey
SymmetricKey(int size)
Construct an key of specified size, with random contents.
QCA::SymmetricKey::SymmetricKey
SymmetricKey(const QByteArray &a)
Construct a key from a provided byte array.
QCA::SymmetricKey::SymmetricKey
SymmetricKey()
Construct an empty (zero length) key.
QCA::SymmetricKey::isWeakDESKey
bool isWeakDESKey()
Test for weak DES keys.
QCA::TokenAsker::waitForResponse
void waitForResponse()
Block until the token request is completed.
QCA::TokenAsker::cancel
void cancel()
Cancel the pending password / passphrase request.
QCA::TokenAsker::responseReady
void responseReady()
Emitted when the asker process has been completed.
QCA::TokenAsker::accepted
bool accepted() const
Test if the token request was accepted or not.
QCA::TokenAsker::TokenAsker
TokenAsker(QObject *parent=nullptr)
Construct a new asker.
QCA::TokenAsker::ask
void ask(const KeyStoreInfo &keyStoreInfo, const KeyStoreEntry &keyStoreEntry, void *ptr)
queue a token request associated with a key store
QList
QObject
QCA
QCA - the Qt Cryptographic Architecture.
Definition qca_basic.h:41
QCA::providerPriority
QCA_EXPORT int providerPriority(const QString &name)
Return the priority of a specified provider.
QCA::setGlobalRandomProvider
QCA_EXPORT void setGlobalRandomProvider(const QString &provider)
Change the global random number provider.
QCA::setProviderPriority
QCA_EXPORT void setProviderPriority(const QString &name, int priority)
Change the priority of a specified provider.
QCA::init
QCA_EXPORT void init()
Initialise QCA.
QCA::scanForPlugins
QCA_EXPORT void scanForPlugins()
Scan for new plugins.
QCA::unloadAllPlugins
QCA_EXPORT void unloadAllPlugins()
Unload the current plugins.
QCA::haveSecureMemory
QCA_EXPORT bool haveSecureMemory()
Test if secure storage memory is available.
QCA::appName
QCA_EXPORT QString appName()
Get the application name that will be used by SASL server mode.
QCA::haveSecureRandom
QCA_EXPORT bool haveSecureRandom()
Test if secure random is available.
QCA::arrayToHex
QCA_EXPORT QString arrayToHex(const QByteArray &array)
Convert a byte array to printable hexadecimal representation.
QCA::insertProvider
QCA_EXPORT bool insertProvider(Provider *p, int priority=0)
Add a provider to the current list of providers.
QCA::logger
QCA_EXPORT Logger * logger()
Return a reference to the QCA Logger, which is used for diagnostics and error recording.
QCA::ProviderList
QList< Provider * > ProviderList
Convenience representation for the plugin providers.
Definition qca_core.h:111
QCA::haveSystemStore
QCA_EXPORT bool haveSystemStore()
Test if QCA can access the root CA certificates.
QCA::isSupported
QCA_EXPORT bool isSupported(const char *features, const QString &provider=QString())
Test if a capability (algorithm) is available.
QCA::MemoryMode
MemoryMode
Mode settings for memory allocation.
Definition qca_core.h:128
QCA::Locking
@ Locking
mlock and drop root
Definition qca_core.h:130
QCA::Practical
@ Practical
mlock and drop root if available, else mmap
Definition qca_core.h:129
QCA::LockingKeepPrivileges
@ LockingKeepPrivileges
mlock, retaining root privileges
Definition qca_core.h:131
QCA::hexToArray
QCA_EXPORT QByteArray hexToArray(const QString &hexString)
Convert a QString containing a hexadecimal representation of a byte array into a QByteArray.
QCA::Direction
Direction
Direction settings for symmetric algorithms.
Definition qca_core.h:141
QCA::Encode
@ Encode
Operate in the "forward" direction; for example, encrypting.
Definition qca_core.h:142
QCA::Decode
@ Decode
Operate in the "reverse" direction; for example, decrypting.
Definition qca_core.h:143
QCA::defaultProvider
QCA_EXPORT Provider * defaultProvider()
Return the default provider.
QCA::supportedFeatures
QCA_EXPORT QStringList supportedFeatures()
Generate a list of all the supported features in plugins, and in built in capabilities.
QCA::pluginDiagnosticText
QCA_EXPORT QString pluginDiagnosticText()
Retrieve plugin diagnostic text.
QCA::getProperty
QCA_EXPORT QVariant getProperty(const QString &name)
Retrieve a global property.
QCA::getProviderConfig
QCA_EXPORT QVariantMap getProviderConfig(const QString &name)
Retrieve provider configuration.
QCA::deinit
QCA_EXPORT void deinit()
Clean up routine.
QCA::clearPluginDiagnosticText
QCA_EXPORT void clearPluginDiagnosticText()
Clear plugin diagnostic text.
QCA::appendPluginDiagnosticText
QCA_EXPORT void appendPluginDiagnosticText(const QString &text)
Add plugin diagnostic text.
QCA::providers
QCA_EXPORT ProviderList providers()
Return a list of the current providers.
QCA::setProperty
QCA_EXPORT void setProperty(const QString &name, const QVariant &value)
Set a global property.
QCA::defaultFeatures
QCA_EXPORT QStringList defaultFeatures()
Generate a list of the built in features.
QCA::unloadProvider
QCA_EXPORT bool unloadProvider(const QString &name)
Unload specified provider.
QCA::saveProviderConfig
QCA_EXPORT void saveProviderConfig(const QString &name)
Save provider configuration to persistent storage.
QCA::pluginPaths
QCA_EXPORT QStringList pluginPaths()
Retrieve plugin paths.
QCA::base64ToArray
QCA_EXPORT QByteArray base64ToArray(const QString &base64String)
Convert a QString containing a base64 representation of a byte array into a QByteArray.
QCA::setProviderConfig
QCA_EXPORT void setProviderConfig(const QString &name, const QVariantMap &config)
Set provider configuration.
QCA::globalRandomProvider
QCA_EXPORT QString globalRandomProvider()
Return the name of the global random number provider.
QCA::arrayToBase64
QCA_EXPORT QString arrayToBase64(const QByteArray &array)
Convert a byte array to printable base64 representation.
QCA::findProvider
QCA_EXPORT Provider * findProvider(const QString &name)
Return the named provider, or 0 if not found.
QCA::setAppName
QCA_EXPORT void setAppName(const QString &name)
Set the application name that will be used by SASL server mode.
QCA::systemStore
QCA_EXPORT CertificateCollection systemStore()
Get system-wide root Certificate Authority (CA) certificates.
qcaVersion
QCA_EXPORT int qcaVersion()
The current version of QCA.
qcaMinorVersion
QCA_EXPORT int qcaMinorVersion()
The current version of QCA.
qcaVersionStr
QCA_EXPORT const char * qcaVersionStr()
The current version of QCA.
qcaPatchVersion
QCA_EXPORT int qcaPatchVersion()
The current version of QCA.
qcaMajorVersion
QCA_EXPORT int qcaMajorVersion()
The current version of QCA.
qca_support.h
Header file for "support" classes used in QCA.
qca_tools.h
Header file for "tool" classes used in QCA.
qca_version.h
Header file with QCA version.