Created
December 11, 2014 17:01
-
-
Save glasserc/f885789186d7d68fbf65 to your computer and use it in GitHub Desktop.
Testing Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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