Versions in this module Expand all Collapse all v1 v1.0.6 Nov 9, 2017 Changes in this version + const BLAKE2B_MAX + const BLAKE2B_MIN + const BLAKE2S_MAX + const BLAKE2S_MIN + const DBL_SHA2_256 + const ID + const KECCAK_224 + const KECCAK_256 + const KECCAK_384 + const KECCAK_512 + const MURMUR3 + const SHA1 + const SHA2_256 + const SHA2_512 + const SHA3 + const SHA3_224 + const SHA3_256 + const SHA3_384 + const SHA3_512 + const SHAKE_128 + const SHAKE_256 + var Codes = map[uint64]string + var DefaultLengths = map[uint64]int + var ErrInvalidMultihash = errors.New("input isn't valid multihash") + var ErrLenNotSupported = errors.New("multihash does not yet support digests longer than 127 bytes") + var ErrSumNotSupported = errors.New("Function not implemented. Complain to lib maintainer.") + var ErrTooLong = errors.New("multihash too long. must be < 129 bytes") + var ErrTooShort = errors.New("multihash too short. must be > 3 bytes") + var ErrUnknownCode = errors.New("unknown multihash code") + var ErrVarintBufferShort = errors.New("uvarint: buffer too small") + var ErrVarintTooLong = errors.New("uvarint: varint too big (max 64bit)") + var Names = map[string]uint64 + func AppCode(code uint64) bool + func Encode(buf []byte, code uint64) ([]byte, error) + func EncodeName(buf []byte, name string) ([]byte, error) + func ValidCode(code uint64) bool + type DecodedMultihash struct + Code uint64 + Digest []byte + Length int + Name string + func Decode(buf []byte) (*DecodedMultihash, error) + type ErrInconsistentLen struct + func (e ErrInconsistentLen) Error() string + type Multihash []byte + func Cast(buf []byte) (Multihash, error) + func FromB58String(s string) (m Multihash, err error) + func FromHexString(s string) (Multihash, error) + func Sum(data []byte, code uint64, length int) (Multihash, error) + func (m *Multihash) HexString() string + func (m *Multihash) String() string + func (m Multihash) B58String() string + type Reader interface + ReadMultihash func() (Multihash, error) + func NewReader(r io.Reader) Reader + type Writer interface + WriteMultihash func(Multihash) error + func NewWriter(w io.Writer) Writer