theTardigrade / golang-hash

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:GNU General Public License v3.0


Languages

Language:Go 100.0%