tests |
---|
Multihash implementation in Python
Multihash is a protocol for differentiating outputs from various well-established cryptographic hash functions, addressing size + encoding considerations.
It is useful to write applications that future-proof their use of hashes, and allow multiple hash functions to coexist. See jbenet/random-ideas#1 for a longer discussion.
There are other Python implementations of multihash out there, including https://github.com/ivilata/pymultihash, https://github.com/multiformats/py-multihash, and at one point, https://github.com/tehmaze/python-multihash. These versions will likely be similar, with minor differences. Currently, it looks like https://github.com/ivilata/pymultihash is the one to use (see https://github.com/libp2p/py-libp2p).
MIT Licensed © 2018 Carson Farmer, 2016 Protocol Labs Inc.
pip install git+https://github.com/carsonfarmer/py-multihash
This package is no longer maintained. If you'd like to contribute, see one of the options above, or fork this one!
This package is a direct port of the official Node/Javascript version. As this projects matures, it may become more 'Pythonic'.
Obsolete and deprecated hash functions are included in this package. MD4, MD5 and SHA-1 should no longer be used for cryptographic purposes, but since many such hashes already exist they are included in the multihash specification and may be implemented in multihash libraries such as this one.