#hex-string #buffer #binary #nice #shortened

pretty-hash

Output binary buffers as a nice, shortened hex string

6 releases

Uses old Rust 2015

0.4.1 Jan 14, 2020
0.4.0 Oct 18, 2018
0.2.0 May 9, 2018
0.1.2 Apr 4, 2018

#885 in Algorithms

Download history 32/week @ 2024-03-13 38/week @ 2024-03-20 47/week @ 2024-03-27 179/week @ 2024-04-03 52/week @ 2024-04-10 36/week @ 2024-04-17 49/week @ 2024-04-24 787/week @ 2024-05-01 962/week @ 2024-05-08 641/week @ 2024-05-15 655/week @ 2024-05-22 247/week @ 2024-05-29 110/week @ 2024-06-05 194/week @ 2024-06-12 468/week @ 2024-06-19 220/week @ 2024-06-26

1,051 downloads per month
Used in 6 crates (3 directly)

MIT/Apache

12KB

pretty-hash

crates.io version build status downloads docs.rs docs

Output binary buffers as a nice, shortened hex string. Adapted from pfrazee/pretty-hash.

Usage

extern crate pretty_hash;

let hash = pretty_hash::fmt(b"1234").unwrap();
assert_eq!(hash, "31323334");

let hash = pretty_hash::fmt(b"12345").unwrap();
assert_eq!(hash, "313233..35");

Installation

$ cargo add pretty-hash

License

MIT OR Apache-2.0

Dependencies

~64KB