algorithms_rs/utils/
mod.rs1fn byte_to_hex(byte: &u8) -> String {
2 format!("{byte:02x}")
3}
4
5pub fn to_hex_string<T: Clone + Into<Vec<u8>>>(bytes: &T) -> String {
7 let hex_vec: Vec<String> = bytes.clone().into().iter().map(byte_to_hex).collect();
8
9 hex_vec.join("")
10}