Documentation ¶
Index ¶
- Constants
- Variables
- func Bytes2Hex(d []byte) string
- func CopyBytes(b []byte) (copiedBytes []byte)
- func FromHex(s string) []byte
- func Hex2Bytes(str string) []byte
- func Hex2BytesFixed(str string, flen int) []byte
- func LeftPadBytes(slice []byte, l int) []byte
- func RightPadBytes(slice []byte, l int) []byte
- func TrimLeftZeroes(s []byte) []byte
- func TrimRightZeroes(s []byte) []byte
- type Address
- type Hash
Constants ¶
View Source
const ( AddressLength = 48 HashLength = 32 )
Variables ¶
View Source
var NilHash = [HashLength]byte{0}
View Source
var Sha256Pool = sync.Pool{ New: func() interface{} { return sha3.NewLegacyKeccak256() }, }
Functions ¶
func Hex2BytesFixed ¶ added in v1.2.2
func LeftPadBytes ¶ added in v1.2.2
func RightPadBytes ¶ added in v1.2.2
func TrimLeftZeroes ¶ added in v1.2.2
func TrimRightZeroes ¶ added in v1.2.2
Types ¶
type Address ¶
type Address [AddressLength]byte
func HexToAddress ¶
func (*Address) MarshalText ¶
func (*Address) UnmarshalJSON ¶
type Hash ¶
type Hash [HashLength]byte
func BytesToHash ¶
func HashOfData ¶ added in v1.2.2
func (Hash) MarshalText ¶ added in v1.2.2
func (*Hash) UnmarshalJSON ¶ added in v1.2.2
Click to show internal directories.
Click to hide internal directories.