Python implementation of the multihash specification (current version 0.8.2). Multihash is a self-describing hash format that includes a hash function identifier and digest length. This library provides encoding, decoding, and hashing utilities. Release cadence is low; last release was in 2020.
pip install pymultihashVerified import paths — ran on the pinned version, not inferred.
Encode and decode multihashes using the standard functions.
Use `multihash.decode()` to extract the raw digest, or use `hashlib` for raw hashing and then `multihash.encode()` to wrap it.
Use the exact names as defined in the multihash table: 'sha1', 'sha2-256', 'sha2-512', 'sha3-512', 'blake2b-256', etc.
Monitor the repo for API changes; no breaking changes have occurred yet.
Ensure the input to `decode()` is a complete multihash-encoded byte string, not a raw hash. Use `digest()` to create a valid multihash.
Use `import multihash` (the package exposes a top-level module).
Use the full multihash name: 'sha2-256', 'sha2-512', 'sha3-512', etc.
Use `multihash.digest(data, 'sha2-256', length=16)` instead of positional third argument.
No dependency data recorded yet.