hash

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HashSize defines the size of hash
	HashSize = 32
	// PKHashSize defines the size of public-key hash
	PKHashSize = 20
	// DKGHashSize defines the size of a DKG hash
	DKGHashSize = 20
)

Variables

View Source
var (
	// ZeroHash32B is 32-bytes of all zero
	ZeroHash32B = Hash32B{}
)

Functions

func Hash160b

func Hash160b(input []byte) []byte

Hash160b returns 160-bit (20-byte) hash of input

func Hash256b

func Hash256b(input []byte) []byte

Hash256b returns 256-bit (32-byte) hash of input

Types

type AddrHash

type AddrHash [PKHashSize]byte

AddrHash for account and smart contract address hash

type DKGHash

type DKGHash [DKGHashSize]byte

DKGHash for DKG hash

type Hash32B

type Hash32B [HashSize]byte

Hash32B is 32-byte hash

func (*Hash32B) SetBytes

func (h *Hash32B) SetBytes(b []byte)

SetBytes copies the byte slice into hash

Jump to

Keyboard shortcuts

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