This package provides utility functions for Pearson hashing. You can use the standard 8-bit hash function:
julia> hash8("Test")
77
Or use hashn
to get multiple of 8 bits (i.e. (8*n
)-bit hash) where n
is based on the return type specified):
julia> hashn(UInt16, "Test")
0x424d
Note that hashn
converts the data passed in using Vector{UInt8}(data)
. This will result in extra allocations if data
is mutable.
For this simple package, just use the REPL:
julia> ?hash8
julia> ?hashn!
julia> ?hashn