Skip to content

Commit

Permalink
Change default hash function returns to a 'digest'
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikat committed Apr 10, 2016
1 parent f2509db commit 04be76d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bf/hash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default_hash_function::default_hash_function(size_t seed)
{
}

size_t default_hash_function::operator()(object const& o) const
digest default_hash_function::operator()(object const& o) const
{
// FIXME: fall back to a generic universal hash function (e.g., HMAC/MD5) for
// too large objects.
Expand Down
6 changes: 3 additions & 3 deletions src/bf/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace bf {

/// The hash digest type.
typedef size_t digest;
typedef uint64_t digest;

/// The hash function type.
typedef std::function<digest(object const&)> hash_function;
Expand All @@ -23,10 +23,10 @@ class default_hash_function

default_hash_function(size_t seed);

size_t operator()(object const& o) const;
digest operator()(object const& o) const;

private:
h3<size_t, max_obj_size> h3_;
h3<digest, max_obj_size> h3_;
};

/// A hasher which hashes an object *k* times.
Expand Down

0 comments on commit 04be76d

Please sign in to comment.