Handbook
Glossary
farm32-seeded ( bytes seed -- hash )
Vocabulary
checksums
.
farmhash
.
private
Inputs
bytes
an
object
seed
an
object
Outputs
hash
an
object
Definition
USING:
checksums.cityhash.private
combinators
math
math.bitwise
sequences
;
IN:
checksums.farmhash.private
::
farm32-seeded
( bytes seed -- hash )
bytes
length
:>
len
{
{
[
len 4
<=
]
[
bytes seed
hash32-0to4
]
}
{
[
len 12
<=
]
[
bytes seed
hash32-5to12
]
}
{
[
len 24
<=
]
[
bytes seed
c1
w*
farm32-13to24
]
}
[
bytes 24
head-slice
seed len
bitxor
farm32-13to24
bytes 24
tail-slice
farm32
seed
w+
mur
]
}
cond
;