code: public String generate(long maxAge) {
  
          // Sweep expired nonces if enough time has passed
          sweepExpiredNonces();
  
          // Generate and store nonce, along with expiration timestamp
          String nonce = new BigInteger(130, random).toString(32);
          nonces.put(nonce, System.currentTimeMillis() + maxAge);
          return nonce;
  
      }
docs: Generates a cryptographically-secure nonce value. The nonce is intended
  to be used to prevent replay attacks.
  
  @param maxAge
  The maximum amount of time that the generated nonce should remain
  valid, in milliseconds.
  
  @return
  A cryptographically-secure nonce value.