Advertisement
Thibstars

SessionIdentifierGenerator

Apr 27th, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. import java.math.BigInteger;
  2. import java.security.SecureRandom;
  3.  
  4. public final class SessionIdentifierGenerator {
  5.     private SecureRandom random = new SecureRandom();
  6.  
  7.     public String nextSessionId() {
  8.         return new BigInteger(130, random).toString(32);
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement