algorithms

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HashAlgorithms = map[int][]string{
	0: {"xxhash"},
	1: {"fnv128"},
	2: {"fnv128a", "fnv"},
	3: {"murmur3-128", "murmur3"},
	4: {"murmur3-64"},
	5: {"murmur3-32"},
	6: {"md5"},
	7: {"sha-256", "sha256"},
	8: {"sha-512", "sha512"},
}

HashAlgorithms Used by CLI for validating --algorithm flag

Functions

This section is empty.

Types

type Algorithm

type Algorithm int
const (
	Xxhash Algorithm = iota
	Fnv128
	Fnv128a
	Murmur3_128
	Murmur3_64
	Murmur3_32
	Md5
	Sha256
	Sha512
)

func (Algorithm) Index

func (a Algorithm) Index() int

Index Returns the index for the Hash Algorithm

func (Algorithm) New

func (a Algorithm) New() hash.Hash

New Instantiates a new representation of the Hash Algorithm.

func (Algorithm) String

func (a Algorithm) String() string

Index Returns the human-readable representation of the Hash Algorithm

Jump to

Keyboard shortcuts

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