{"library":"pymultihash","title":"pymultihash","description":"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.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install pymultihash"],"cli":null},"imports":["import multihash"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import multihash\n\n# Hash data using SHA2-256 (code 0x12)\ndigest = multihash.digest(b'hello world', 'sha2-256')\nprint(digest.hex())  # multihash encoded\n\n# Decode a multihash\ndecoded = multihash.decode(digest)\nprint(decoded.code)  # 0x12\nprint(decoded.digest.hex())  # raw digest\n\n# Hash with a specific length (truncated)\ndigest_trunc = multihash.digest(b'hello world', 'sha2-256', 8)\nprint(len(digest_trunc))  # 1 (varint code) + 1 (length) + 8 = 10 bytes","lang":"python","description":"Encode and decode multihashes using the standard functions.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}