hexutil

package
v0.0.0-...-ee99c87 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2018 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyString   = &decError{"empty hex string"}
	ErrSyntax        = &decError{"invalid hex string"}
	ErrMissingPrefix = &decError{"hex string without 0x prefix"}
	ErrOddLength     = &decError{"hex string of odd length"}
)

Functions

func BytesToHex

func BytesToHex(b []byte) string

BytesToHex encodes b as a hex string with 0x prefix.

func Has0xPrefix

func Has0xPrefix(input string) bool

func HexToBytes

func HexToBytes(input string) ([]byte, error)

HexToBytes decodes a hex string with 0x prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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