Skip to content

This Go package contains functions that produce non-cryptographic hashes.

License

Notifications You must be signed in to change notification settings

theTardigrade/golang-hash

Repository files navigation

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 Go Report Card

Example

package main

import (
	"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