#hex #encode

hex

Encoding and decoding data into/from hexadecimal representation

6 releases (3 breaking)

✓ Uses Rust 2018 edition

0.4.0 Sep 17, 2019
0.3.2 Apr 19, 2018
0.3.1 Nov 13, 2017
0.2.0 Mar 28, 2016
0.1.0 Oct 23, 2015
Download history 69241/week @ 2019-06-04 99370/week @ 2019-06-11 53403/week @ 2019-06-18 50467/week @ 2019-06-25 43796/week @ 2019-07-02 45205/week @ 2019-07-09 47127/week @ 2019-07-16 50769/week @ 2019-07-23 51591/week @ 2019-07-30 54241/week @ 2019-08-06 56789/week @ 2019-08-13 51759/week @ 2019-08-20 48018/week @ 2019-08-27 56960/week @ 2019-09-03 53264/week @ 2019-09-10

217,086 downloads per month
Used in 1,023 crates (426 directly)

MIT/Apache

15KB
279 lines

Documentation: https://docs.rs/hex

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Encoding and decoding hex strings.

For most cases, you can simply use the decode(), encode() and encode_upper() functions. If you need a bit more control, use the traits ToHex and FromHex instead.

Example

extern crate hex;

fn main() {
    let hex_string = hex::encode("Hello world!");
    println!("{}", hex_string); // Prints '48656c6c6f20776f726c6421'
}

No runtime deps