xj9 fb1b3fa089 > google cla 1 month ago
src Rename multihash::HashTypes -> multihash::HashType 2 years ago
.gitignore Initial commit. Hashing works. TODO: Documentation and decode. 4 years ago
.travis.yml Remove #[feature(convert)], add .travis.yml 2 years ago
Cargo.toml Update authors 2 years ago
LICENSE.md Full license now included. 4 years ago
README.md > google cla 1 month ago

README.md

Multihash for Rust

rust-multihash is an implementation of the multihash algorithm that allows for multiple different hash algorithms to be contained in the same format. This makes it extensible as new hashing algorithms are added.

the table-lookup approach is kind of silly and needs to be (ab)used if possible, to be meaningfully self-describing.

To use, add rust-multihash= "0.2.0" to your Cargo.toml file.

Example

To get a SHA2-256 hash of a string:

use multihash::{HashType, multihash};

let hash = multihash(HashType::SHA2256, "Hello World".to_vec());