Documentation ¶
Overview ¶
This packages maps gnablib terms to go (to speed up dev) and adheres to https://datatracker.ietf.org/doc/html/rfc4648#section-8 which says HEX is case-insensitive, but uses upper case letters in all examples no need extra features
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLength = errors.New("hex string must be composed of pairs of hex values")
Length error (1 extra character.. is it the high or low nibble?)
Functions ¶
func InvalidHexAt ¶
An invalid character(b) found at position(at) in a hex string
func ToBytes ¶
Covert a case-insensitive hex string into a byte slice, if any of the hex is malformed (invalid character) or there's an odd number of chars, then an error is returned (and no slice)
func ToBytesFast ¶
Convert a case-insensitive hex string into a byte slice, if any of the hex is malformed (invalid character) or there's an odd number of chars, then nil is returned (which may also be a valid answer if len(hex)=0) 3% faster than ToBytes (x64 tests)
Types ¶
This section is empty.