Documentation ¶
Index ¶
- Constants
- func DecodeHex(str string) ([]byte, error)
- func DecodeHexToBig(hexNum string) (*big.Int, error)
- func DecodeNibble(in byte) uint64
- func DecodeString(str string) ([]byte, error)
- func DecodeUint64(hexStr string) (uint64, error)
- func EncodeBig(bigint *big.Int) string
- func EncodeToHex(str []byte) string
- func EncodeToString(str []byte) string
- func EncodeUint64(i uint64) string
- func MustDecodeHex(str string) []byte
- type DecError
Constants ¶
View Source
const BadNibble = ^uint64(0)
Variables ¶
This section is empty.
Functions ¶
func DecodeHexToBig ¶
DecodeHexToBig converts a hex number to a big.Int value
func DecodeString ¶
DecodeString returns the byte representation of the hexadecimal string
func DecodeUint64 ¶
DecodeUint64 decodes a hex string with 0x prefix to uint64
func EncodeBig ¶
EncodeBig encodes bigint as a hex string with 0x prefix. The sign of the integer is ignored.
func EncodeToHex ¶
EncodeToHex generates a hex string based on the byte representation, with the '0x' prefix
func EncodeToString ¶
EncodeToString is a wrapper method for hex.EncodeToString
func EncodeUint64 ¶
EncodeUint64 encodes a number as a hex string with 0x prefix.
func MustDecodeHex ¶
MustDecodeHex type-checks and converts a hex string to a byte array
Types ¶
Click to show internal directories.
Click to hide internal directories.