PeerId

typealias PeerId = Sha1Hash

A 20-byte BitTorrent peer id. This is the pure-Kotlin port of libtorrent's using peer_id = sha1_hash; (peer_id.hpp). Structurally it is just a 20-byte digest, so it aliases Sha1Hash exactly as upstream aliases sha1_hash.

A peer id is constructed, not hashed. The leading bytes carry the client fingerprint (e.g. "-KT0010-") and the remaining bytes are random, so each session announces a stable client signature plus a unique per-session tail.