Versions in this module Expand all Collapse all v0 v0.3.3 Apr 28, 2015 v0.3.2 Apr 22, 2015 v0.2.3 Feb 27, 2015 v0.2.2 Feb 27, 2015 Changes in this version + const BLAKE2B + const BLAKE2S + const SHA1 + const SHA2_256 + const SHA2_512 + const SHA3 + var Codes = map[int]string + var DefaultLengths = map[int]int + 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 Names = map[string]int + func AppCode(code int) bool + func Encode(buf []byte, code int) ([]byte, error) + func EncodeName(buf []byte, name string) ([]byte, error) + func ValidCode(code int) bool + type DecodedMultihash struct + Code int + 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 int, 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