Function to_infohash

Source
pub fn to_infohash(haf: &HashAndFormat) -> Id
Expand description

From: https://github.com/n0-computer/iroh-experiments/blob/4e052c6b34720e26683083270706926a84e49411/content-discovery/iroh-mainline-content-discovery/src/client.rs#L53

The mapping from an iroh [HashAndFormat] to a bittorrent infohash, aka [mainline::Id].

Since an infohash is just 20 bytes, this can not be a bidirectional mapping.