hash

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// HashSize defines the size of hash
	HashSize = 32
	// PKHashSize defines the size of public-key hash
	PKHashSize = 20
	// CacheHashSize defines the size of local hash key
	CacheHashSize = 20
)

Variables

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

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 CacheHash added in v0.4.0

type CacheHash [CacheHashSize]byte

CacheHash for 20-byte hash used in cache

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

type PKHash added in v0.4.0

type PKHash [PKHashSize]byte

PKHash for account and smart contract address hash

Jump to

Keyboard shortcuts

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