Decode takes a fully qualified hostname that has been encoded with the stateless dns naming scheme, and returns its IP, expiry time and salt.
New generates a temporary hostname for the given ip, with the given subdomain, having the given expiry, using the given secret.