Fingerprint returns the first 6 bytes of a byte slice. If the slice is less than 6 bytes, the fingerprint contains trailing zeroes.
The main purpose of HexBytes is to enable HEX-encoding for json/encoding.
Allow it to fulfill various interfaces in light-client, etc...
Marshal needed for protobuf compatibility
MarshalJSON implements the json.Marshaler interface. The hex bytes is a quoted hexadecimal encoded string.
Unmarshal needed for protobuf compatibility
UnmarshalJSON implements the json.Umarshaler interface.