SessionCode

Encodes an IPv4 address and port into a short, shareable code (Crockford base32, e.g. "K7Q2M-9XZ4P") for joining by hand when discovery is blocked — without showing the address.

Functions

Link copied to clipboard
fun decode(code: String): Pair<String, Int>?

Returns (address, port), or null if the code is malformed. Accepts lowercase and common look-alikes.

Link copied to clipboard
fun encode(ipv4: String, port: Int): String?