Figure 5: The GENERATE-TOKEN algorithm.