pub fn encode_to_string(buf: Vec<u8>) -> String