Allow token encryption to be disabled. Tweaked operations to simplify construction