1
0
mirror of https://github.com/stom79/exodus-android-app synced 2024-12-22 03:04:23 +01:00

Uses SecureRandom - Fix issue #32

This commit is contained in:
Thomas 2020-12-09 16:20:49 +01:00
parent a9e72c0cb3
commit 91682ed3b1

View File

@ -41,6 +41,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.SecureRandom;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -53,7 +54,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.TimeZone;
import java.util.concurrent.Semaphore;
@ -268,7 +268,7 @@ public class NetworkManager {
packages.retainAll(handles.keySet());
// Add some random packages to avoid tracking
Random rand = new Random(Thread.currentThread().getId());
SecureRandom rand = new SecureRandom();
int alea = rand.nextInt(120) % 10 + 11;
for (int i = 0; i < alea; i++) {
int val = rand.nextInt(applications.length());