[FIX] Немножко оптимизирован алгоритм генерации dictonary.

This commit is contained in:
Zaxar163 2019-11-28 17:42:45 +01:00
parent 3923251fd2
commit af88a02a52
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B

View file

@ -18,7 +18,7 @@
import java.util.List;
public class ProguardConf {
private static final String chars = "1aAbBcC2dDeEfF3gGhHiI4jJkKl5mMnNoO6pPqQrR7sStT8uUvV9wWxX0yYzZ";
private static final char[] chars = "1aAbBcC2dDeEfF3gGhHiI4jJkKl5mMnNoO6pPqQrR7sStT8uUvV9wWxX0yYzZ".toCharArray();
public static final String[] JAVA9_OPTS = new String[] {
"-libraryjars '<java.home>/jmods/'"
@ -35,7 +35,7 @@ private static String generateString(SecureRandom rand, String lowString, String
sb.append(rand.nextBoolean() ? lowString.charAt(i) : upString.charAt(i));
}
int toI = il - lowString.length();
for (int i = 0; i < toI; i++) sb.append(chars.charAt(rand.nextInt(chars.length())));
for (int i = 0; i < toI; i++) sb.append(chars[rand.nextInt(chars.length)]);
return sb.toString();
}