Java tutorial
//package com.java2s; import java.security.SecureRandom; public class Main { public static synchronized String getNonce() { SecureRandom sr = new SecureRandom(); return Long.toString(Math.abs(sr.nextLong()), Character.MAX_RADIX); } }