Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thetardigrade/golang-hash
This Go package contains functions that produce non-cryptographic hashes.
https://github.com/thetardigrade/golang-hash
fnv-1a fnv-algorithm go golang hash hash-functions hashing hashing-algorithm
Last synced: 3 days ago
JSON representation
This Go package contains functions that produce non-cryptographic hashes.
- Host: GitHub
- URL: https://github.com/thetardigrade/golang-hash
- Owner: theTardigrade
- License: gpl-3.0
- Created: 2021-08-19T16:42:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T10:15:08.000Z (over 1 year ago)
- Last Synced: 2024-09-30T17:06:58.965Z (3 days ago)
- Topics: fnv-1a, fnv-algorithm, go, golang, hash, hash-functions, hashing, hashing-algorithm
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# golang-hash
This Go package contains functions that produce non-cryptographic hashes in various bit sizes. These functions use the Fowler–Noll–Vo hash (FNV-1a) algorithm.
[![Go Reference](https://pkg.go.dev/badge/github.com/theTardigrade/golang-hash.svg)](https://pkg.go.dev/github.com/theTardigrade/golang-hash) [![Go Report Card](https://goreportcard.com/badge/github.com/theTardigrade/golang-hash)](https://goreportcard.com/report/github.com/theTardigrade/golang-hash)
## Example
```golang
package mainimport (
"fmt"hash "github.com/theTardigrade/golang-hash"
)func main() {
const input = "this is a simple test"fmt.Printf(
"%x\n\n%x\n\n%x\n\n%x\n\n%x\n",
hash.Uint8String(input),
hash.Int8String(input),
hash.UintString(input),
hash.Uint256String(input),
hash.Int256String(input),
)
}
```## Support
If you use this package, or find any value in it, please consider donating:
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S2EIRL0)