i0 0.2.1

thei.rs/i0 reference implementation written in rust
Documentation

i0.rs

i0 reference implementation written in rust

cli

cargo install i0 -F cli,dig,bench

there are 3 different binaries:

  • i0 (-F cli) to generate i0-dentifiers
  • i0-dig (-F dig) tries to cause an intentional hash collision for getting vanity i0-dentifiers
  • i0-bench (-F bench) is a small benchmarking tool, because i0 turned out surprisingly useful for comparing raw CPU compute

usage

cargo add i0

use i0::{v3, Timestamp};
use rand::{TryRngCore, rngs::OsRng};

let mut seed: [u8; 32] = [0u8; 32];
OsRng.try_fill_bytes(&mut seed)?;

let metadata = v3::Metadata {
    designation: "some user-defined string",
    timestamp: &Timestamp::new(),
    seed: &seed,
};

let (short: String, long: String) = v3::generate(&metadata);

license

dual-licensed under either Apache 2.0 or MIT