Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Random; public class Main { private static Random c = new Random(); public static String generateNonce() { long l = c.nextLong(); int i = (int) (System.currentTimeMillis() / 60000L); return (new StringBuilder(String.valueOf(l))).append(":").append(i).toString(); } }