1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use sha; /// Bittorrent `NodeId`. pub type NodeId = sha::ShaHash; /// Bittorrent `PeerId`. pub type PeerId = sha::ShaHash; /// Bittorrent `InfoHash`. pub type InfoHash = sha::ShaHash; /// Length of a `NodeId`. pub const NODE_ID_LEN: usize = sha::SHA_HASH_LEN; /// Length of a `PeerId`. pub const PEER_ID_LEN: usize = sha::SHA_HASH_LEN; /// Length of an `InfoHash`. pub const INFO_HASH_LEN: usize = sha::SHA_HASH_LEN;