Crates.io | cid_fork_rlay |
lib.rs | cid_fork_rlay |
version | 0.3.1 |
source | src |
created_at | 2019-08-19 23:02:12.626508 |
updated_at | 2019-08-19 23:02:12.626508 |
description | CID in rust |
homepage | https://github.com/multiformats/rust-cid |
repository | |
max_upload_size | |
id | 158200 |
size | 17,278 |
CID implementation in Rust.
First add this to your Cargo.toml
[dependencies]
cid = "*"
Then run cargo build
.
extern crate cid;
extern crate multihash;
use multihash::Hash;
use cid::{Cid, Codec, Version};
let h = multihash::encode(multihash::Hash::SHA2256, b"beep boop").unwrap();
let cid = Cid::new(Codec::DagProtobuf, Version::V1, &h);
let data = cid.to_bytes();
let out = Cid::from(data).unwrap();
assert_eq!(cid, out);
Captain: @dignifiedquire.
Contributions welcome. Please check out the issues.
Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.
Small note: If editing the README, please conform to the standard-readme specification.
MIT © 2017 Friedel Ziegelmayer