Session Identifier


SUBMITTED BY: assassin413

DATE: Oct. 7, 2016, 2:05 p.m.

FORMAT: Text only

SIZE: 267 Bytes

HITS: 459

  1. import java.security.SecureRandom;
  2. import java.math.BigInteger;
  3. public final class SessionIdentifierGenerator {
  4. private SecureRandom random = new SecureRandom();
  5. public String nextSessionId() {
  6. return new BigInteger(130, random).toString(32);
  7. }
  8. }

comments powered by Disqus