hash

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const HashSize = 32
View Source
const StampSize = 4

Variables

View Source
var UndefHash = Hash{0}

Functions

func Hash160

func Hash160(data []byte) []byte

func Hash256

func Hash256(data []byte) []byte

Types

type Hash

type Hash [HashSize]byte

func CalcHash

func CalcHash(data []byte) Hash

func FromBytes

func FromBytes(data []byte) (Hash, error)

func FromString

func FromString(str string) (Hash, error)

func (Hash) Bytes

func (h Hash) Bytes() []byte

func (Hash) EqualsTo

func (h Hash) EqualsTo(r Hash) bool

func (Hash) Fingerprint

func (h Hash) Fingerprint() string

func (Hash) IsUndef

func (h Hash) IsUndef() bool

func (Hash) SanityCheck

func (h Hash) SanityCheck() error

func (Hash) Stamp

func (h Hash) Stamp() Stamp

func (Hash) String

func (h Hash) String() string

type Stamp

type Stamp [StampSize]byte

func StampFromString

func StampFromString(str string) (Stamp, error)

func (Stamp) Bytes

func (s Stamp) Bytes() []byte

func (Stamp) EqualsTo

func (s Stamp) EqualsTo(r Stamp) bool

func (Stamp) String

func (s Stamp) String() string

Jump to

Keyboard shortcuts

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