hash

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blake256Sum

func Blake256Sum(b []byte) []byte

Blake256Sum returns the blake sha256 for b

func Ripemd160Sum

func Ripemd160Sum(b []byte) []byte

Ripemd160Sum returns the ripemd160 for b

func Sha256Sum

func Sha256Sum(b []byte) []byte

Sha256Sum returns the sha256 for b

Types

type Hasher

type Hasher interface {
	// Hash256 calculate the crypto OP_HASH256
	Hash256([]byte) []byte
	// Hash160 calculate the crypto OP_HASH160
	Hash160([]byte) []byte
}

Hasher contains methods to calculate necessary hashes

func New

func New(c *cryptos.Crypto) (Hasher, error)

New returns an hasher for the provided crypto

func NewBCH

func NewBCH() Hasher

NewBCH returns an hasher for bitcoin-cash

func NewBTC

func NewBTC() Hasher

NewBTC returns an hasher for bitcoin

func NewDCR

func NewDCR() Hasher

NewDCR returns an hasher for decred

func NewDOGE

func NewDOGE() Hasher

NewDOGE returns an hasher for dogecoin

func NewLTC

func NewLTC() Hasher

NewLTC returns an hasher for litecoin

Jump to

Keyboard shortcuts

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