Preserve entropy in TokenGenerator

base_convert loses precision on large inputs. Suggest using base64_encode instead, and replacing +/= characters with URL-safe equivalents.