Crates.io | scid |
lib.rs | scid |
version | 0.3.0 |
source | src |
created_at | 2019-05-14 20:43:07.709339 |
updated_at | 2019-05-14 20:43:07.709339 |
description | SCID in rust |
homepage | https://github.com/susyp2p/rust-scid |
repository | |
max_upload_size | |
id | 134386 |
size | 17,340 |
SCID implementation in Rust.
First add this to your Cargo.toml
[dependencies]
scid = "*"
Then run cargo build
.
extern crate scid;
extern crate multihash;
use multihash::Hash;
use scid::{Sscid, Codec, Version};
let h = multihash::encode(multihash::Hash::SHA2256, b"beep boop").unwrap();
let scid = Sscid::new(Codec::DagProtobuf, Version::V1, &h);
let data = scid.to_bytes();
let out = Sscid::from(data).unwrap();
assert_eq!(scid, 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 susyp2p 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