keyHash
datatypes: hey = keyHash (X)
datatypes: hey = keyHash (X, base)
Generate a hash code for an array.
h = keyHash (X)
generates a uint64
scalar that
represents the input X, which may be numeric, logical, or character
array or cell array of character vectors. keyHash
utilizes the 64-bit
FMV-1a variant of the Fowler-Noll-Vo non-cryptographic hash function.
h = keyHash (X), base
also generates a 64-bit
hash code using base as the offset basis for the FNV-1a hash
algorithm. base must be a uint64
integer type scalar. Use
this syntax to cascade keyHash
on multiple objects for which a
single hash code is required.
Note that unlike MATLAB, this implementation does no use any random seed.
As a result, keyHash
will always generate the exact same hash key
for any particular input across different workers and Octave sessions.
Source Code: keyHash