The QCryptographicHash class provides a way to generate cryptographic hashes. More...
#include <QCryptographicHash>
Note: All functions in this class are reentrant.
This class was introduced in Qt 4.3.
enum | Algorithm { Md4, Md5, Sha1 } |
QCryptographicHash ( Algorithm method ) | |
~QCryptographicHash () | |
void | addData ( const char * data, int length ) |
void | addData ( const QByteArray & data ) |
void | reset () |
QByteArray | result () const |
QByteArray | hash ( const QByteArray & data, Algorithm method ) |
The QCryptographicHash class provides a way to generate cryptographic hashes.
QCryptographicHash can be used to generate cryptographic hashes of binary or text data.
Currently MD4, MD5, and SHA-1 are supported.
Constant | Value | Description |
---|---|---|
QCryptographicHash::Md4 | 0 | Generate an MD4 hash sum |
QCryptographicHash::Md5 | 1 | Generate an MD5 hash sum |
QCryptographicHash::Sha1 | 2 | Generate an SHA1 hash sum |
Constructs an object that can be used to create a cryptographic hash from data using method.
Destroys the object.
Adds the first length chars of data to the cryptographic hash.
This function overloads addData().
Returns the hash of data using method.
Resets the object.
Returns the final hash value.
See also QByteArray::toHex().
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.