private String randomHash(final String folder) throws Exception {
  try {
    MessageDigest algorithm=MessageDigest.getInstance("MD5");
    algorithm.reset();
    try {
      algorithm.update(folder.getBytes("UTF8"));
    }
 catch (    UnsupportedEncodingException e) {
      if (configuration.isDebugMode()) {
        throw e;
      }
      algorithm.update(folder.getBytes());
    }
    byte[] messageDigest=algorithm.digest();
    StringBuffer hexString=new StringBuffer();
    for (int i=0; i < messageDigest.length; i++) {
      hexString.append(Integer.toHexString(HASH & messageDigest[i]));
    }
    return hexString.toString();
  }
 catch (  NoSuchAlgorithmException e) {
    if (configuration.isDebugMode()) {
      throw e;
    }
    return "";
  }
}

private String randomHash ( final String folder ) throws Exception { try { MessageDigest algorithm = MessageDigest . getInstance ( "MD5" ) ; algorithm . reset ( ) ; try { algorithm . update ( folder . getBytes ( "UTF8" ) ) ; } catch ( UnsupportedEncodingException e ) { if ( configuration . isDebugMode ( ) ) { throw e ; } algorithm . update ( folder . getBytes ( ) ) ; } byte [ ] messageDigest = algorithm . digest ( ) ; StringBuffer hexString = new StringBuffer ( ) ; for ( int i = 0 ; i < messageDigest . length ; i ++ ) { hexString . append ( Integer . toHexString ( HASH & messageDigest [ i ] ) ) ; } return hexString . toString ( ) ; } catch ( NoSuchAlgorithmException e ) { if ( configuration . isDebugMode ( ) ) { throw e ; } return "" ; } }
gets hash for folders in xml response to avoid cached responses .
