tendermint: github.com/tendermint/tendermint/libs/bytes Index | Files

package bytes

import "github.com/tendermint/tendermint/libs/bytes"

Index

Package Files

bytes.go byteslice.go

func Fingerprint Uses

func Fingerprint(slice []byte) []byte

Fingerprint returns the first 6 bytes of a byte slice. If the slice is less than 6 bytes, the fingerprint contains trailing zeroes.

type HexBytes Uses

type HexBytes []byte

The main purpose of HexBytes is to enable HEX-encoding for json/encoding.

func (HexBytes) Bytes Uses

func (bz HexBytes) Bytes() []byte

Allow it to fulfill various interfaces in light-client, etc...

func (HexBytes) Format Uses

func (bz HexBytes) Format(s fmt.State, verb rune)

func (HexBytes) Marshal Uses

func (bz HexBytes) Marshal() ([]byte, error)

Marshal needed for protobuf compatibility

func (HexBytes) MarshalJSON Uses

func (bz HexBytes) MarshalJSON() ([]byte, error)

This is the point of Bytes.

func (HexBytes) String Uses

func (bz HexBytes) String() string

func (*HexBytes) Unmarshal Uses

func (bz *HexBytes) Unmarshal(data []byte) error

Unmarshal needed for protobuf compatibility

func (*HexBytes) UnmarshalJSON Uses

func (bz *HexBytes) UnmarshalJSON(data []byte) error

This is the point of Bytes.

Package bytes imports 3 packages (graph) and is imported by 65 packages. Updated 2019-12-12. Refresh now. Tools for package owners.