base16-rs 0.1.1

The base16-rs library in Rust offers capabilities for encoding and decoding data in Base16 format. By utilizing the hex library, you can transform data into its hexadecimal representation and also decode hexadecimal strings to retrieve the original data. This encoding technique is frequently employed for tasks involving data transmission and storage, as well as in situations where binary data necessitates representation in readable ASCII strings.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use base16_rs::base16::Encoder;
use base16_rs::base16::Type::StdEncoding;

fn main() {
    println!("hello base16");
    base16_rs::add(120, 140);

    let str = String::from("abcdefghijklmnop");

    let buf: Vec<u8> = str.into_bytes();

    let encoder = Encoder::new(StdEncoding);
    let result  = encoder.encode_upper_to_string(&buf);
    println!("{:?}", result);
}