func CheckEncode(input []byte, version [2]byte) string {
	b := make([]byte, 0, 2+len(input)+4)
	b = append(b, version[:]...)
	b = append(b, input[:]...)
	cksum := checksum(b)
	b = append(b, cksum[:]...)
	return Encode(b)
}
CheckEncode prepends two version bytes and appends a four byte checksum.
package base58
import (
	"crypto/sha256"
	"errors"
)
var ErrChecksum = errors.New("checksum error")
var ErrInvalidFormat = errors.New("invalid format: version and/or checksum bytes missing")
func checksum(input []byte) (cksum [4]byte) {
	h := sha256.Sum256(input)
	h2 := sha256.Sum256(h[:])
	copy(cksum[:], h2[:4])
	return
}