hash

package
v0.0.0-...-a529750 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Keccak = "keccak"
	Md5    = "md5"
	Sha256 = "sha256"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

type Hasher interface {
	Hash(data ...[]byte) []byte
}

func GetHasher

func GetHasher(hasher string) Hasher

type Keccak256Hasher

type Keccak256Hasher struct{}

func (*Keccak256Hasher) Hash

func (k *Keccak256Hasher) Hash(data ...[]byte) []byte

type Md5Hasher

type Md5Hasher struct{}

func (*Md5Hasher) Hash

func (m *Md5Hasher) Hash(data ...[]byte) []byte

type Sha256Hasher

type Sha256Hasher struct{}

func (*Sha256Hasher) Hash

func (m *Sha256Hasher) Hash(data ...[]byte) []byte

Jump to

Keyboard shortcuts

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