[tor-commits] [tor/master] hs: Move link specifier encoding to a function