The highest tagged major version is
v13.
package
Version:
v12.122.0
Opens a new window with list of versions in this module.
Published: May 4, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 5
Opens a new window with list of known importers.
Documentation
¶
Package hash contains different hash algorithms and utilities
FileHash generates an SHA-256 hash for a given file
hash := FileHash("/path/to/some/file")
fmt.Println(hash)
Output:
JCHash generates Google's Jump Consistent Hash
More info: http://arxiv.org/abs/1406.2294
var (
key uint64 = 0xDEADBEEF
buckets int = 128 * 1024
)
hash := JCHash(key, buckets)
fmt.Println(hash)
Output:
110191
Source Files
¶
Click to show internal directories.
Click to hide internal directories.