View Source Murmur (Murmur v2.0.0)
This module implements the x86_32, x86_128 and x64_128 variants of the non-cryptographic hash Murmur3.
Examples
iex> Murmur.hash_x86_32("b2622f5e1310a0aa14b7f957fe4246fa", 2147368987)
3297211900
iex> Murmur.hash_x86_128("some random data")
217376041865091047320520964146365461062
# hashes of Erlang terms may change between Erlang versions
# iex> Murmur.hash_x64_128([:yes, :you, :can, :use, :any, :Erlang, :term!])
# => 300414073828138369336317731503972665325Summary
Functions
Returns the hashed Erlang term data using an optional seed which defaults to 0.
Returns the hashed Erlang term data using an optional seed which defaults to 0.
Returns the hashed Erlang term data using an optional seed which defaults to 0.
Functions
@spec hash_x64_128(binary() | term(), non_neg_integer()) :: non_neg_integer()
Returns the hashed Erlang term data using an optional seed which defaults to 0.
This function uses the x64 128bit variant.
@spec hash_x86_32(binary() | term(), non_neg_integer()) :: non_neg_integer()
Returns the hashed Erlang term data using an optional seed which defaults to 0.
This function uses the x86 32bit variant.
@spec hash_x86_128(binary() | term(), non_neg_integer()) :: non_neg_integer()
Returns the hashed Erlang term data using an optional seed which defaults to 0.
This function uses the x86 128bit variant.