mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
better random
This commit is contained in:
parent
cd0bebf45e
commit
042d0ea23a
1 changed files with 2 additions and 1 deletions
|
@ -72,6 +72,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.Cipher;
|
||||
|
@ -597,7 +598,7 @@ public class EncryptionUtils {
|
|||
|
||||
ArrayList<String> outputLines = new ArrayList<>();
|
||||
for (int i = 0; i < count; i++) {
|
||||
int randomLine = (int) (random.nextDouble() * lines.size());
|
||||
int randomLine = new Random().nextInt(lines.size());
|
||||
outputLines.add(lines.get(randomLine));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue