mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-07 12:48:03 +02:00
PseudoRandom
This commit is contained in:
parent
2514ae9852
commit
5f2feedebb
@ -1,6 +1,7 @@
|
||||
package fr.xephi.authme.commands;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package fr.xephi.authme.security;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
@ -25,6 +26,7 @@ public class RandomString {
|
||||
if (length < 1)
|
||||
throw new IllegalArgumentException("length < 1: " + length);
|
||||
buf = new char[length];
|
||||
random.setSeed(Calendar.getInstance().getTimeInMillis());
|
||||
}
|
||||
|
||||
public String nextString() {
|
||||
|
Loading…
Reference in New Issue
Block a user