Utility for generating tokens