Function to_hex_shortened

pub fn to_hex_shortened<const M: usize>(data: &impl AsRef<[u8]>) -> String
Expand description

Converts the given data into a hex string, removing the middle part of the string if it is longer than M of hex characters.

The returned string is at most M characters-long.