QCA
qca_basic.h
Go to the documentation of this file.
531 http://crypto.stackexchange.com/questions/9043/what-is-the-difference-between-pkcs5-padding-and-pkcs7-padding/9044#9044.
600 };
613 };
773 void setup(Direction dir, const SymmetricKey &key, const InitializationVector &iv = InitializationVector());
789 void setup(Direction dir, const SymmetricKey &key, const InitializationVector &iv, const AuthTag &tag);
839 MessageAuthenticationCode(const QString &type, const SymmetricKey &key, const QString &provider = QString());
General superclass for buffered computation algorithms.
Definition qca_core.h:1052
bool validKeyLength(int n) const
Test if a key length is valid for the cipher algorithm.
Cipher(const QString &type, Mode mode, Padding pad, Direction dir, const SymmetricKey &key, const InitializationVector &iv, const AuthTag &tag, const QString &provider=QString())
Standard constructor.
static QStringList supportedTypes(const QString &provider=QString())
Returns a list of all of the cipher types available.
void setup(Direction dir, const SymmetricKey &key, const InitializationVector &iv=InitializationVector())
Reset / reconfigure the Cipher.
static QString withAlgorithms(const QString &cipherType, Mode modeType, Padding paddingType)
Construct a Cipher type string.
Cipher(const QString &type, Mode mode, Padding pad=DefaultPadding, Direction dir=Encode, const SymmetricKey &key=SymmetricKey(), const InitializationVector &iv=InitializationVector(), const QString &provider=QString())
Standard constructor.
MemoryRegion update(const MemoryRegion &a) override
pass in a byte array of data, which will be encrypted or decrypted (according to the Direction that w...
void setup(Direction dir, const SymmetricKey &key, const InitializationVector &iv, const AuthTag &tag)
Reset / reconfigure the Cipher.
Definition qca_basic.h:1101
HKDF(const QString &algorithm=QStringLiteral("sha256"), const QString &provider=QString())
Standard constructor.
SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, const InitializationVector &info, unsigned int keyLength)
Generate the key from a specified secret, salt value, and an additional info.
static QStringList supportedTypes(const QString &provider=QString())
Returns a list of all of the hash types available.
void update(QIODevice *file)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void update(const MemoryRegion &a) override
Update a hash, adding more of the message contents to the digest.
MemoryRegion hash(const MemoryRegion &array)
Hash a byte array, returning it as another byte array
void update(const QByteArray &a)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString hashToString(const MemoryRegion &array)
Hash a byte array, returning it as a printable string
void update(const char *data, int len=-1)
This is an overloaded member function, provided for convenience. It differs from the above function o...
General superclass for key derivation algorithms.
Definition qca_basic.h:954
KeyDerivationFunction(const KeyDerivationFunction &from)
Standard copy constructor.
static QString withAlgorithm(const QString &kdfType, const QString &algType)
Construct the name of the algorithm.
KeyDerivationFunction & operator=(const KeyDerivationFunction &from)
Assignment operator.
SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, unsigned int keyLength, int msecInterval, unsigned int *iterationCount)
Generate the key from a specified secret and salt value.
SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, unsigned int keyLength, unsigned int iterationCount)
Generate the key from a specified secret and salt value.
KeyDerivationFunction(const QString &type, const QString &provider)
Special constructor for subclass initialisation.
General class for message authentication code (MAC) algorithms.
Definition qca_basic.h:828
bool validKeyLength(int n) const
Test if a key length is valid for the MAC algorithm.
MessageAuthenticationCode(const QString &type, const SymmetricKey &key, const QString &provider=QString())
Standard constructor.
static QStringList supportedTypes(const QString &provider=QString())
Returns a list of all of the message authentication code types available.
void setup(const SymmetricKey &key)
Initialise the MAC algorithm.
MessageAuthenticationCode & operator=(const MessageAuthenticationCode &from)
Assignment operator.
void update(const MemoryRegion &array) override
Update the MAC, adding more of the message contents to the digest.
MessageAuthenticationCode(const MessageAuthenticationCode &from)
Standard copy constructor.
void clear() override
Reset a MessageAuthenticationCode, dumping all previous parts of the message.
PBKDF1(const QString &algorithm=QStringLiteral("sha1"), const QString &provider=QString())
Standard constructor.
Definition qca_basic.h:1058
PBKDF2(const QString &algorithm=QStringLiteral("sha1"), const QString &provider=QString())
Standard constructor.
Definition qca_basic.h:1083
static SecureArray randomArray(int size)
Provide a specified number of random bytes.
Header file for core QCA infrastructure.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:53:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:53:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.