From 83ccafd97dbe2146d0132a21c4fd31617820f3e2 Mon Sep 17 00:00:00 2001 From: "Peter D. Barnes, Jr." Date: Tue, 13 Nov 2012 16:42:50 -0800 Subject: [PATCH] Document cached hash state, used for incremental hashing. --- src/core/model/hash-fnv.h | 2 +- src/core/model/hash-murmur3.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/model/hash-fnv.h b/src/core/model/hash-fnv.h index 0ab99455a..3e44f657e 100644 --- a/src/core/model/hash-fnv.h +++ b/src/core/model/hash-fnv.h @@ -96,7 +96,7 @@ private: }; //@{ /** - * Cache last hash value, for incremental hashing + * Cache last hash value, for incremental hashing. */ uint32_t m_hash32; uint64_t m_hash64; diff --git a/src/core/model/hash-murmur3.h b/src/core/model/hash-murmur3.h index d4d75dcda..38730083a 100644 --- a/src/core/model/hash-murmur3.h +++ b/src/core/model/hash-murmur3.h @@ -98,15 +98,17 @@ private: SEED = 0x8BADF00D // Ate bad food }; //@{ - /** - * Cache last hash value, and total bytes hashed, + /** + * Cache last hash value, and total bytes hashed (needed to finalize), * for incremental hashing */ uint32_t m_hash32; uint32_t m_size32; - uint64_t m_hash64[2]; // murmur3 produces 128-bit hash + /** murmur3 produces 128-bit hash and state; we use just the first 64-bits. */ + uint64_t m_hash64[2]; uint64_t m_size64; //@} + }; // class Murmur3 } // namespace Function