package jenkins
import "gvisor.dev/gvisor/pkg/tcpip/hash/jenkins"
Package jenkins implements Jenkins's one_at_a_time, non-cryptographic hash functions created by by Bob Jenkins.
See https://en.wikipedia.org/wiki/Jenkins_hash_function#cite_note-dobbsx-1
Index ¶
Functions ¶
func New32 ¶
New32 returns a new 32-bit Jenkins's one_at_a_time hash.Hash.
Its Sum method will lay the value out in big-endian byte order.
Types ¶
type Sum32 ¶
type Sum32 uint32
Sum32 represents Jenkins's one_at_a_time hash.
Use the Sum32 type directly (as opposed to New32 below) to avoid allocations.
func (*Sum32) BlockSize ¶
BlockSize returns the hash's underlying block size.
func (*Sum32) Reset ¶
func (s *Sum32) Reset()
Reset resets the hash to its initial state.
func (*Sum32) Size ¶
Size returns the number of bytes Sum will return.
func (*Sum32) Sum ¶
Sum appends the current hash to in and returns the resulting slice.
It does not change the underlying hash state.
func (*Sum32) Sum32 ¶
Sum32 returns the hash value
func (*Sum32) Write ¶
Write adds more data to the running hash.
It never returns an error.
Source Files ¶
jenkins.go
- Version
- v0.0.0-20250515200445-d30c58e5b8a4 (latest)
- Published
- May 15, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 10 hours ago –
Tools for package owners.