conv

package
v0.0.0-...-dfc0bd1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigInt2BytesLe

func BigInt2BytesLe(z []byte, x *big.Int)

BigInt2BytesLe stores a positive big.Int number x into a little-endian slice z. The slice is modified if the bitlength of x <= 8*len(z) (padding with zeros). If x does not fit in the slice or is negative, z is not modified.

func BigInt2Uint64Le

func BigInt2Uint64Le(z []uint64, x *big.Int)

BigInt2Uint64Le stores a positive big.Int number x into a little-endian slice z. The slice is modified if the bitlength of x <= 8*len(z) (padding with zeros). If x does not fit in the slice or is negative, z is not modified.

func BytesBe2Uint64Le

func BytesBe2Uint64Le(x []byte) []uint64

BytesBe2Uint64Le converts a big-endian slice x to a little-endian slice of uint64.

func BytesLe2BigInt

func BytesLe2BigInt(x []byte) *big.Int

BytesLe2BigInt converts a little-endian slice x into a big-endian math/big.Int.

func BytesLe2Hex

func BytesLe2Hex(x []byte) string

BytesLe2Hex returns an hexadecimal string of a number stored in a little-endian order slice x.

func Uint64Le2BigInt

func Uint64Le2BigInt(x []uint64) *big.Int

Uint64Le2BigInt converts a little-endian slice x into a big number.

func Uint64Le2BytesBe

func Uint64Le2BytesBe(x []uint64) []byte

Uint64Le2BytesBe converts a little-endian slice x to a big-endian slice of bytes.

func Uint64Le2BytesLe

func Uint64Le2BytesLe(x []uint64) []byte

Uint64Le2BytesLe converts a little-endian slice x to a little-endian slice of bytes.

func Uint64Le2Hex

func Uint64Le2Hex(x []uint64) string

Uint64Le2Hex returns an hexadecimal string of a number stored in a little-endian order slice x.

Types

This section is empty.

Jump to

Keyboard shortcuts

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