Encoding onion addresses [ONIONADDRESS]
The onion address of a hidden service includes its identity public key, a version field and a basic checksum. All this information is then base32 encoded as shown below:
onion_address = base32(PUBKEY | CHECKSUM | VERSION) + ".onion"
CHECKSUM = H(".onion checksum" | PUBKEY | VERSION)[:2]
PUBKEYis the 32 bytes ed25519 master pubkey of the hidden service.
VERSIONis an one byte version field (default value
".onion checksum"is a constant string
CHECKSUMis truncated to two bytes before inserting it in
From the context, I understand it is a concatenation-- is that so?
If one has a working short Python\Node\Ruby snippet for that, it would be lovely. :)