Skip to content

Instantly share code, notes, and snippets.

@glasserc
Created December 11, 2014 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glasserc/f885789186d7d68fbf65 to your computer and use it in GitHub Desktop.
Save glasserc/f885789186d7d68fbf65 to your computer and use it in GitHub Desktop.
Testing Gist
public String generateKey(String id) {
// this should be unique: userId + currentTime + 5 digit random number
return Base62Converter.encodeString(id + "-" +
String.valueOf(System.currentTimeMillis()) + "-" +
RandomStringUtils.randomAlphanumeric(5));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment