func (h Hash20) MarshalText() ([]byte, error) {
	data, err := util.Bytes(h[:]).MarshalText()
	if err != nil {
		return data, fmt.Errorf("marshal text: %w", err)
	}
	return data, nil
}
MarshalText returns the hex representation of h.
package types
import (
	"fmt"
	"math/big"
	"math/rand"
	"reflect"
	"github.com/spacemeshos/sha256-simd"
	"github.com/spacemeshos/go-spacemesh/common/util"
	"github.com/spacemeshos/go-spacemesh/log"
)
const (
	Hash32Length = 32
	hash20Length = 20
	hash12Length = 12
)
type Hash12 [hash12Length]byte
type Hash32 [Hash32Length]byte
type Hash20 [hash20Length]byte
func (h Hash12) Field() log.Field { return log.String("hash", util.Bytes2Hex(h[:])) }
func (h Hash20) Bytes() []byte { return h[:] }
func (h Hash20) Big() *big.Int { return new(big.Int).SetBytes(h[:]) }
func (h Hash20) Hex() string { return util.Encode(h[:]) }
func (h Hash20) String() string {
	return h.Hex()
}
func (h Hash20) ShortString() string {
	l := len(h.Hex())
	return h.Hex()[util.Min(2, l):util.Min(7, l)]
}
func (h Hash20) Format(s fmt.State, c rune) {
	_, _ = fmt.Fprintf(s, "%"+string(c), h[:])
}
func (h *Hash20) UnmarshalText(input []byte) error {
	if err := util.UnmarshalFixedText("Hash", input, h[:]); err != nil {
		return fmt.Errorf("unmarshal text: %w", err)
	}
	return nil
}
func (h *Hash20) UnmarshalJSON(input []byte) error {
	if err := util.UnmarshalFixedJSON(hashT, input, h[:]); err != nil {
		return fmt.Errorf("unmarshal JSON: %w", err)
	}
	return nil
}