private static String generateRandomString(){
  final StringBuilder res=new StringBuilder();
  final Random rnd=new SecureRandom();
  for (int i=0; i < 32; i++) {
    int pos=(int)(rnd.nextFloat() * CHARS.length());
    res.append(CHARS.charAt(pos));
  }
  return res.toString();
}

private static String generateRandomString ( ) { final StringBuilder res = new StringBuilder ( ) ; final Random rnd = new SecureRandom ( ) ; for ( int i = 0 ; i < 32 ; i ++ ) { int pos = ( int ) ( rnd . nextFloat ( ) * CHARS . length ( ) ) ; res . append ( CHARS . charAt ( pos ) ) ; } return res . toString ( ) ; }
generates a random string
