hash

package
v0.0.0-...-3866e28 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MockIter int = 10

Variables

View Source
var MockStrings []string = []string{
	"Hello World!",
	"Hello, 世界!",
}

Functions

This section is empty.

Types

type Hasher

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

Hasher interface defines the behavior of a recursive hasher which takes in an empty interface (to support multiple formats) and returns a slice of bytes (the hashed seed)

type MD5

type MD5 struct{}

MD5 struct is a general placeholder for the MD5 algorithm, to implement the Hasher interface

func (MD5) Hash

func (hasher MD5) Hash(data []byte) []byte

Hash method satisfies the Hasher interface. It's a recursive hashing function to allow continuous hashing

type SHA1

type SHA1 struct{}

SHA1 struct is a general placeholder for the SHA1 algorithm, to implement the Hasher interface

func (SHA1) Hash

func (hasher SHA1) Hash(data []byte) []byte

Hash method satisfies the Hasher interface. It's a recursive hashing function to allow continuous hashing

type SHA224

type SHA224 struct{}

SHA224 struct is a general placeholder for the SHA224 algorithm, to implement the Hasher interface

func (SHA224) Hash

func (hasher SHA224) Hash(data []byte) []byte

Hash method satisfies the Hasher interface. It's a recursive hashing function to allow continuous hashing

type SHA256

type SHA256 struct{}

SHA256 struct is a general placeholder for the SHA256 algorithm, to implement the Hasher interface

func (SHA256) Hash

func (hasher SHA256) Hash(data []byte) []byte

Hash method satisfies the Hasher interface. It's a recursive hashing function to allow continuous hashing

type SHA384

type SHA384 struct{}

SHA384 struct is a general placeholder for the SHA384 algorithm, to implement the Hasher interface

func (SHA384) Hash

func (hasher SHA384) Hash(data []byte) []byte

Hash method satisfies the Hasher interface. It's a recursive hashing function to allow continuous hashing

type SHA512

type SHA512 struct{}

SHA512 struct is a general placeholder for the SHA512 algorithm, to implement the Hasher interface

func (SHA512) Hash

func (hasher SHA512) Hash(data []byte) []byte

Hash method satisfies the Hasher interface. It's a recursive hashing function to allow continuous hashing

type SHA512_224

type SHA512_224 struct{}

SHA512 struct is a general placeholder for the SHA512 algorithm, to implement the Hasher interface

func (SHA512_224) Hash

func (hasher SHA512_224) Hash(data []byte) []byte

Hash method satisfies the Hasher interface. It's a recursive hashing function to allow continuous hashing

type SHA512_256

type SHA512_256 struct{}

SHA512 struct is a general placeholder for the SHA512 algorithm, to implement the Hasher interface

func (SHA512_256) Hash

func (hasher SHA512_256) Hash(data []byte) []byte

Hash method satisfies the Hasher interface. It's a recursive hashing function to allow continuous hashing

Jump to

Keyboard shortcuts

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