pkg

package
v0.0.0-...-8e5b8b6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockHeaderBytes

func BlockHeaderBytes(b *common.BlockHeader) []byte

func BockDataHash

func BockDataHash(block common.Block, hashFunc HashFunc) []byte

计算区块 data 部分 hash

func BockHeaderHash

func BockHeaderHash(block common.Block, hashFunc HashFunc) []byte

计算区块头部 hash

func Bytes2Block

func Bytes2Block(data []byte) (*common.Block, error)

二进制文件转成 block

func Sha256Hash

func Sha256Hash(data []byte) []byte

sha256 哈希函数

func Sm3Hash

func Sm3Hash(data []byte) []byte

国密哈希函数

Types

type HashFunc

type HashFunc func(data []byte) []byte

Jump to

Keyboard shortcuts

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