Author: bbrossaud Date: 2010-05-11 12:18:29 +0200 (Tue, 11 May 2010) New Revision: 19 Url: http://chorem.org/repositories/revision/bow/19 Log: added the TokenActions comments Modified: trunk/src/main/java/org/chorem/bow/TokenActions.java Modified: trunk/src/main/java/org/chorem/bow/TokenActions.java =================================================================== --- trunk/src/main/java/org/chorem/bow/TokenActions.java 2010-05-11 10:11:30 UTC (rev 18) +++ trunk/src/main/java/org/chorem/bow/TokenActions.java 2010-05-11 10:18:29 UTC (rev 19) @@ -23,10 +23,10 @@ public String generateToken() throws NoSuchAlgorithmException { Double rand = Math.random() * 1000000; - int res = (int) Math.abs(rand); + int res = (int) Math.abs(rand); // generate a token between 0 and 1 000 000 String tokenGenerated = String.valueOf(res); - tokenGenerated = StringUtil.encodeMD5(tokenGenerated); - return tokenGenerated; + tokenGenerated = StringUtil.encodeMD5(tokenGenerated); // encode the token in MD5 + return tokenGenerated; // return the generate token } public void setToken(String token) {
participants (1)
-
bbrossaudï¼ users.chorem.org