#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

#1969 in Algorithms

Download history 68/week @ 2024-11-14 34/week @ 2024-11-21 33/week @ 2024-11-28 46/week @ 2024-12-05 45/week @ 2024-12-12 7/week @ 2024-12-19 2/week @ 2024-12-26 16/week @ 2025-01-02 25/week @ 2025-01-09 30/week @ 2025-01-16 16/week @ 2025-01-23 26/week @ 2025-01-30 47/week @ 2025-02-06 30/week @ 2025-02-13 50/week @ 2025-02-20 21/week @ 2025-02-27

151 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

~65KB