hash

package module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2019 License: MIT Imports: 4 Imported by: 8

README

hash

Godoc Report Tests Coverage Sponsor

Ultra-fast hashing of arbitrary bytes.

Usage

x := hash.Bytes([]byte("Hello World"))

Benchmarks

Hashing 10 KB:

BenchmarkBytes-12       30485769                37.9 ns/op             0 B/op          0 allocs/op
BenchmarkString-12      29912976                38.3 ns/op             0 B/op          0 allocs/op
BenchmarkReader-12      19175532                61.3 ns/op            32 B/op          1 allocs/op

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(in []byte) uint64

Bytes hashes the given byte slice.

func Reader added in v0.2.0

func Reader(reader io.Reader) uint64

Reader hashes all the bytes in the given reader.

func String

func String(in string) uint64

String hashes the given string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL