Created
November 26, 2014 05:22
-
-
Save januprasad/2931a1ed48bb032bf75d to your computer and use it in GitHub Desktop.
SessionIdentifierGenerator to create unique values (random hashkeys)
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 final class SessionIdentifierGenerator { | |
private SecureRandom random = new SecureRandom(); | |
public String nextSessionId() { | |
return new BigInteger(130, random).toString(32); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment