|
KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
|
|
Stateful incremental hasher for streamed input. More...
#include <cryptoutil.h>
Public Member Functions | |
| Hasher (Algorithm algorithm) | |
| Construct a hasher for the given algorithm. | |
| void | addData (const QByteArray &data) |
| Append data to the running hash. | |
| void | reset () |
| Reset the hash state so the instance can be reused. | |
| QByteArray | result () const |
| Return the current digest as raw bytes. | |
| QString | resultString () const |
| Return the current digest as a lowercase hex string. | |
Stateful incremental hasher for streamed input.
For cases where the full input isn't available up front (e.g. streaming network downloads). Hex output matches the static md5String/sha256String helpers in this class.
Definition at line 140 of file cryptoutil.h.
|
explicit |
Construct a hasher for the given algorithm.
| algorithm | Which digest to compute. |
| void CryptoUtil::Hasher::addData | ( | const QByteArray & | data | ) |
Append data to the running hash.
| data | Bytes to fold into the digest. |