byteutil

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

create by platon

Index

Constants

This section is empty.

Variables

View Source
var Bytes2X_CMD = map[string]interface{}{
	"string":   BytesToString,
	"[8]byte":  BytesTo8Bytes,
	"[16]byte": BytesTo16Bytes,
	"[32]byte": BytesTo32Bytes,
	"[64]byte": BytesTo64Bytes,

	"uint8":  BytesToUint8,
	"uint16": BytesToUint16,
	"uint32": BytesToUint32,
	"uint64": BytesToUint64,

	"*big.Int":             BytesToBigInt,
	"[]*big.Int":           BytesToBigIntArr,
	"discover.NodeID":      BytesToNodeId,
	"[]discover.NodeID":    BytesToNodeIdArr,
	"common.Hash":          BytesToHash,
	"[]common.Hash":        BytesToHashArr,
	"common.Address":       BytesToAddress,
	"[]common.Address":     BytesToAddressArr,
	"common.VersionSign":   BytesToVersionSign,
	"[]common.VersionSign": BytesToVersionSignArr,

	"[]restricting.RestrictingPlan": BytesToRestrictingPlanArr,
}

Functions

func BytesTo8Bytes added in v0.7.1

func BytesTo8Bytes(curByte []byte) [8]byte

func BytesTo16Bytes added in v0.7.1

func BytesTo16Bytes(curByte []byte) [16]byte

func BytesTo32Bytes

func BytesTo32Bytes(curByte []byte) [32]byte

func BytesTo64Bytes

func BytesTo64Bytes(curByte []byte) [64]byte

func BytesToAddress

func BytesToAddress(curByte []byte) common.Address

func BytesToAddressArr added in v0.7.1

func BytesToAddressArr(curByte []byte) []common.Address

func BytesToBigInt

func BytesToBigInt(curByte []byte) *big.Int

func BytesToBigIntArr added in v0.7.1

func BytesToBigIntArr(curByte []byte) []*big.Int

func BytesToHash

func BytesToHash(curByte []byte) common.Hash

func BytesToHashArr added in v0.7.1

func BytesToHashArr(curByte []byte) []common.Hash

func BytesToNodeId

func BytesToNodeId(curByte []byte) discover.NodeID

func BytesToNodeIdArr added in v0.7.1

func BytesToNodeIdArr(curByte []byte) []discover.NodeID

func BytesToRestrictingPlanArr added in v0.7.1

func BytesToRestrictingPlanArr(curByte []byte) []restricting.RestrictingPlan

func BytesToString

func BytesToString(curByte []byte) string

func BytesToUint8 added in v0.7.1

func BytesToUint8(b []byte) uint8

func BytesToUint16 added in v0.7.1

func BytesToUint16(b []byte) uint16

func BytesToUint32 added in v0.7.1

func BytesToUint32(b []byte) uint32

func BytesToUint64 added in v0.7.1

func BytesToUint64(b []byte) uint64

func BytesToVersionSign added in v0.7.1

func BytesToVersionSign(currByte []byte) common.VersionSign

func BytesToVersionSignArr added in v0.7.1

func BytesToVersionSignArr(currByte []byte) []common.VersionSign

func PrintNodeID added in v0.7.1

func PrintNodeID(nodeID discover.NodeID) string

func RTrim added in v0.7.1

func RTrim(src []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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