hash

package
v0.0.0-...-e95280a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	FromBytes(input []byte) (*Hash, error)
	FromMultiBytes(input [][]byte) (*Hash, error)
	FromString(input string) (*Hash, error)
}

Adapter represents an hash adapter

func NewAdapter

func NewAdapter() Adapter

NewAdapter returns a new hash adapter

type Hash

type Hash [64]byte

Hash represents a hash

func (Hash) Bytes

func (obj Hash) Bytes() []byte

Bytes returns the bytes of an hash

func (Hash) Compare

func (obj Hash) Compare(other Hash) bool

Compare returns true if the current hash is the same as the passed one

func (Hash) String

func (obj Hash) String() string

String returns the string of an hash

Jump to

Keyboard shortcuts

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