|
MagicSmoke
$VERSION$
|
Calculate a cryptographic HMAC (used by authentication algorithm) More...
#include <hmac.h>
Public Member Functions | |
| SMHmac (QCryptographicHash::Algorithm algo, const QByteArray &key) | |
| constructs an object that calculates HMACs More... | |
| void | addData (const char *data, int length) |
| adds length bytes of data to the hash-stream More... | |
| void | addData (const QByteArray &data) |
| adds data to the hash-stream More... | |
| void | reset () |
| reset the hash to the state immediately after construction More... | |
| QByteArray | result () |
| finalize the hash and return the result More... | |
Static Public Member Functions | |
| static int | blockWidth (QCryptographicHash::Algorithm) |
| returns the length of the blocks used internally in the given algorithm in bytes; this should have been implemented by QCryptographicHash! returns -1 if in doubt More... | |
| static QByteArray | hmac (const QByteArray &data, const QByteArray &key, QCryptographicHash::Algorithm method) |
| complete HMAC calculation in a can More... | |
| static int | resultWidth (QCryptographicHash::Algorithm) |
| returns the length of the results of given algorithm in bytes; this should have been implemented by QCryptographicHash! performs a test calculation if the algo is unknown More... | |
Calculate a cryptographic HMAC (used by authentication algorithm)
| SMHmac::SMHmac | ( | QCryptographicHash::Algorithm | algo, |
| const QByteArray & | key | ||
| ) |
constructs an object that calculates HMACs
References blockWidth().
| void SMHmac::addData | ( | const char * | data, |
| int | length | ||
| ) |
adds length bytes of data to the hash-stream
Referenced by hmac().
| void SMHmac::addData | ( | const QByteArray & | data | ) |
adds data to the hash-stream
|
static |
returns the length of the blocks used internally in the given algorithm in bytes; this should have been implemented by QCryptographicHash! returns -1 if in doubt
Referenced by SMHmac().
|
static |
complete HMAC calculation in a can
References addData(), and result().
Referenced by EFilter::getRandom().
| void SMHmac::reset | ( | ) |
reset the hash to the state immediately after construction
| QByteArray SMHmac::result | ( | ) |
finalize the hash and return the result
Referenced by hmac().
|
static |
returns the length of the results of given algorithm in bytes; this should have been implemented by QCryptographicHash! performs a test calculation if the algo is unknown