#hex #encode #decoding #hexadecimal

hex

Encoding and decoding data into/from hexadecimal representation

5 unstable releases

0.3.2 Apr 19, 2018
0.3.1 Nov 13, 2017
0.3.0 Nov 13, 2017
0.2.0 Mar 28, 2016
0.1.0 Oct 23, 2015

#36 in Encoding

Download history 17767/week @ 2018-08-23 23281/week @ 2018-08-30 21215/week @ 2018-09-06 25949/week @ 2018-09-13 25975/week @ 2018-09-20 23363/week @ 2018-09-27 24013/week @ 2018-10-04 23814/week @ 2018-10-11 25761/week @ 2018-10-18 24089/week @ 2018-10-25 27242/week @ 2018-11-01 25325/week @ 2018-11-08 27077/week @ 2018-11-15

67,095 downloads per month
Used in 527 crates (177 directly)

MIT/Apache

13KB
234 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