iscc-rs

Rust implementation of the ISCC specification

Documentation

Usage

Add this to your Cargo.toml:

toml [dependencies] iscc-rs = "0.2"

Example

This example shows how to create an ISCC Code. ```rust use std::error::Error;

use iscc::{contentidtext, dataid, instanceid, meta_id};

fn main() -> Result<(), Box> { // Generate ISCC Component Codes let (mid, title, _extra) = metaid("Title of Content", ""); let cid = contentidtext("some text", false); let did = dataid("tests/testdata/mediafile.html")?; let (iid, tophash) = instanceid("tests/test_data/mediafile.html")?;

// Join ISCC Components to fully qualified ISCC Code
let iscc_code = [mid, cid, did, iid].join("-");
println!("ISCC: {}", iscc_code);

Ok(())

} ```