code: public String generateNonce() {
  		// Get the time of day and run MD5 over it.
  		Date date = new Date();
  		long time = date.getTime();
  		Random rand = new Random();
  		long pad = rand.nextLong();
  		String nonceString = (Long.valueOf(time)).toString()
  				+ (Long.valueOf(pad)).toString();
  		byte mdbytes[] = messageDigest.digest(nonceString.getBytes());
  		// Convert the mdbytes array into a hex string.
  		return toHexString(mdbytes);
  	}
docs: Generate the challenge string.
  
  @return a generated nonce.