Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeHex(str string) ([]byte, error)
- func DecodeNibble(in byte) uint64
- func DecodeString(str string) ([]byte, 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
- func MustDecodeString(str string) []byte
- type DecError
Constants ¶
View Source
const BadNibble = ^uint64(0)
Variables ¶
View Source
var ( ErrSyntax = &DecError{"invalid hex string"} ErrMissingPrefix = &DecError{"hex string without 0x prefix"} ErrEmptyNumber = &DecError{"hex string \"0x\""} ErrLeadingZero = &DecError{"hex number with leading zero digits"} ErrUint64Range = &DecError{"hex number > 64 bits"} ErrBig256Range = &DecError{"hex number > 256 bits"} )
Functions ¶
func DecodeNibble ¶
func DecodeString ¶
func EncodeBig ¶
EncodeBig encodes bigint as a hex string with 0x prefix. The sign of the integer is ignored.
func EncodeToHex ¶
func EncodeToString ¶
func EncodeUint64 ¶
EncodeUint64 encodes i as a hex string with 0x prefix.
func MustDecodeHex ¶
func MustDecodeString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.