byteutil

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

	"uint8":   BytesToUint8,
	"uint16":  BytesToUint16,
	"*uint16": BytesToUint16Point,
	"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":       BytesToAddressPoint,
	"[]common.Address":      BytesToAddressArr,
	"common.VersionSign":    BytesToVersionSign,
	"[]common.VersionSign":  BytesToVersionSignArr,
	"bls.PublicKeyHex":      BytesToPublicKeyHex,
	"[]bls.PublicKeyHex":    BytesToPublicKeyHexArr,
	"bls.SchnorrProofHex":   BytesToSchnorrProofHex,
	"[]bls.SchnorrProofHex": BytesToSchnorrProofHexArr,

	"[]restricting.RestrictingPlan": BytesToRestrictingPlanArr,
}

Functions

func BytesTo16Bytes

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

func BytesTo32Bytes

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

func BytesTo64Bytes

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

func BytesTo8Bytes

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

func BytesToAddress

func BytesToAddress(curByte []byte) common.Address

func BytesToAddressArr

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

func BytesToAddressPoint

func BytesToAddressPoint(curByte []byte) *common.Address

func BytesToBigInt

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

func BytesToBigIntArr

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

func BytesToHash

func BytesToHash(curByte []byte) common.Hash

func BytesToHashArr

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

func BytesToNodeId

func BytesToNodeId(curByte []byte) discover.NodeID

func BytesToNodeIdArr

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

func BytesToPublicKeyHex

func BytesToPublicKeyHex(currByte []byte) bls.PublicKeyHex

func BytesToPublicKeyHexArr

func BytesToPublicKeyHexArr(currByte []byte) []bls.PublicKeyHex

func BytesToRestrictingPlanArr

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

func BytesToSchnorrProofHex

func BytesToSchnorrProofHex(currByte []byte) bls.SchnorrProofHex

func BytesToSchnorrProofHexArr

func BytesToSchnorrProofHexArr(currByte []byte) []bls.SchnorrProofHex

func BytesToString

func BytesToString(curByte []byte) string

func BytesToStringPoint

func BytesToStringPoint(curByte []byte) *string

func BytesToUint16

func BytesToUint16(b []byte) uint16

func BytesToUint16Point

func BytesToUint16Point(b []byte) *uint16

func BytesToUint32

func BytesToUint32(b []byte) uint32

func BytesToUint64

func BytesToUint64(b []byte) uint64

func BytesToUint8

func BytesToUint8(b []byte) uint8

func BytesToVersionSign

func BytesToVersionSign(currByte []byte) common.VersionSign

func BytesToVersionSignArr

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

func Concat

func Concat(s1 []byte, s2 ...byte) []byte

func PrintNodeID

func PrintNodeID(nodeID discover.NodeID) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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