6 releases (3 breaking)

Uses old Rust 2015

0.4.0 Nov 21, 2022
0.3.0 Dec 1, 2018
0.2.1 Dec 28, 2016
0.1.1 Dec 19, 2016

#110 in Value formatting

Download history 359/week @ 2024-01-13 357/week @ 2024-01-20 314/week @ 2024-01-27 233/week @ 2024-02-03 196/week @ 2024-02-10 645/week @ 2024-02-17 332/week @ 2024-02-24 205/week @ 2024-03-02 225/week @ 2024-03-09 193/week @ 2024-03-16 264/week @ 2024-03-23 102/week @ 2024-03-30 186/week @ 2024-04-06 240/week @ 2024-04-13 353/week @ 2024-04-20 342/week @ 2024-04-27

1,123 downloads per month
Used in 2 crates (via malwaredb-server)

MIT license

8KB
87 lines

Human Hash (Rust)

human hash provides human-readable representations of digests.

This is a Rustlang port of Zachary Voase's humanhash for Python.

Usage

Use this library to generate human readable and reproducible hash summaries. Useful when looking at a list of UUIDs, or as a shorthand way to remember and select from hard to remember list.

Don't use this for security purposes.

Example

extern crate human_hash;
extern crate uuid;

use human_hash::humanize;
use uuid::Uuid;

fn main() {
    let my_uuid = Uuid::parse_str("7528880a986c40e78c38115e640da2a1").unwrap();
    let my_digest = humanize(&my_uuid, 4);

    println!("Original Hash: {}", my_uuid);
    println!("Digest:        {}", my_digest);
}

Output

  humanize_demo git:(master)  cargo run
   Compiling humanize_demo v0.1.0
    Finished debug [unoptimized + debuginfo] target(s) in 0.45 secs
     Running `target/debug/humanize_demo`

Original Hash: 7528880a-986c-40e7-8c38-115e640da2a1
Digest:        three-georgia-xray-jig

License

Licensed under the MIT license

Dependencies

~210KB