Function generateMedallion

  • Randomly selects a number that can be used as a medallion. Note that this doesn't actually have to be cryptographically secure; as long as it's unique within an organization there won't be problems. This is unlikely to cause collisions as long as an organization has fewer than a million instances, after that some tracking is warranted. https://en.wikipedia.org/wiki/Birthday_problem#Probability_table

    Returns any