List of usage examples for java.util Random toString
public String toString()
From source file:com.k42b3.neodym.oauth.Oauth.java
private String getNonce() { try {/*from ww w . ja v a 2 s . c om*/ byte[] nonce = new byte[32]; Random rand; rand = SecureRandom.getInstance("SHA1PRNG"); rand.nextBytes(nonce); return DigestUtils.md5Hex(rand.toString()); } catch (Exception e) { return DigestUtils.md5Hex("" + System.currentTimeMillis()); } }