45 #define _MD5_H_ // Needed to disable system header 48 #include "../../3rdparty/md5/md5.h" 49 #include "../../3rdparty/md5/md5.cpp" 50 #include "../../3rdparty/md4/md4.h" 51 #include "../../3rdparty/md4/md4.cpp" 52 #include "../../3rdparty/sha1/sha1.cpp" 140 md4_update(&
d->
md4Context, (
const unsigned char *)data, length);
143 MD5Update(&
d->
md5Context, (
const unsigned char *)data, length);
146 sha1Update(&
d->
sha1Context, (
const unsigned char *)data, length);
174 md4_final(©, (
unsigned char *)
d->
result.
data());
180 MD5Final(©, (
unsigned char *)
d->
result.
data());
186 sha1FinalizeState(©);
187 sha1ToHash(©, (
unsigned char *)
d->
result.
data());
QCryptographicHash::Algorithm method
#define QT_END_NAMESPACE
This macro expands to.
char * data()
Returns a pointer to the data stored in the byte array.
The QByteArray class provides an array of bytes.
QCryptographicHash(Algorithm method)
Constructs an object that can be used to create a cryptographic hash from data using method...
QCryptographicHashPrivate * d
#define QT_BEGIN_NAMESPACE
This macro expands to.
static const char * data(const QByteArray &arr)
int length() const
Same as size().
const char * constData() const
Returns a pointer to the data stored in the byte array.
void addData(const char *data, int length)
Adds the first length chars of data to the cryptographic hash.
void resize(int size)
Sets the size of the byte array to size bytes.
QByteArray result() const
Returns the final hash value.
~QCryptographicHash()
Destroys the object.
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
static QByteArray hash(const QByteArray &data, Algorithm method)
Returns the hash of data using method.
void clear()
Clears the contents of the byte array and makes it empty.
void reset()
Resets the object.
The QCryptographicHash class provides a way to generate cryptographic hashes.