Code example for Random

Methods: nextLong

0
        } 
        return null; 
    } 
 
    protected void calculateClientFirstMessage() { 
        Random rnd = new Random(System.currentTimeMillis());
        cnonce = "666" + rnd.nextLong();
        String username = jid.getNode();
        clientFirstMessageBare = "n=" + username + ",r=" + cnonce;
    } 
 
//#if (android) 
//# private String processServerMessage(String serverFirstMessage) { 
//# 		String[] attrs = serverFirstMessage.split(","); 
//#  
//# 		int i=Integer.parseInt( getAttribute(attrs, 'i') ); 
//# 		String salt=getAttribute(attrs, 's'); 
//# 		String r=getAttribute(attrs, 'r'); 
//# 		byte[] pwd; 
//# 		try { 
//# 			pwd = pass.getBytes("UTF-8");