Package-level declarations
Types
Link copied to clipboard
class DhKeyExchange
Diffie-Hellman key exchange for BitTorrent Message Stream Encryption (MSE/PE). Pure-Kotlin port of dh_key_exchange in libtorrent's src/pe_crypto.cpp.
Link copied to clipboard
class Hasher256
Incremental SHA-256 hasher producing a Sha256Hash, the port of libtorrent's hasher256. Used for BitTorrent v2 piece hashing and merkle-tree nodes.
Link copied to clipboard
Holds the two keyed RC4 streams for one MSE connection, the port of libtorrent's rc4_handler. There is one Rc4 instance per direction. Each is keyed, then its first MseCrypto.RC4_DISCARD (1024) keystream bytes are discarded, exactly as rc4_handler::set_outgoing_key and set_incoming_key do.