summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcryptographichash.h
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2018-04-03 12:40:53 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2018-04-10 12:17:43 +0000
commit5e7a64d1e321ddba751c0b18daf7920fde7c7de0 (patch)
tree8fc42dd4023135e99e7de90f39dfa8527db11926 /src/corelib/tools/qcryptographichash.h
parente027c7241f073f5fc8c1db88700cc83635b6454f (diff)
QCryptographicHash: Add a static method to retrieve hash length
It's useful when you need to check how long a hash will be without first generating one. [ChangeLog][QtCore][QCryptographicHash] Add a static method, hashLength, which returns the length of the output of a hash function in bytes. Change-Id: Id6a454016523de83d157fd95c50105c6db4bb1d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/tools/qcryptographichash.h')
-rw-r--r--src/corelib/tools/qcryptographichash.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qcryptographichash.h b/src/corelib/tools/qcryptographichash.h
index 2f74d42405..ad1de7c756 100644
--- a/src/corelib/tools/qcryptographichash.h
+++ b/src/corelib/tools/qcryptographichash.h
@@ -101,6 +101,7 @@ public:
QByteArray result() const;
static QByteArray hash(const QByteArray &data, Algorithm method);
+ static int hashLength(Algorithm method);
private:
Q_DISABLE_COPY(QCryptographicHash)
QCryptographicHashPrivate *d;