mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-27 13:03:12 -05:00
Add method to set seed
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
This commit is contained in:
parent
30bb26473e
commit
04755c0a07
@ -9,6 +9,10 @@ public class HelperFunctions {
|
||||
|
||||
private static Random random = new Random(seed);
|
||||
|
||||
synchronized public static void setSeed(long seed){
|
||||
random.setSeed(seed);
|
||||
}
|
||||
|
||||
public static void setRenderingHints(Graphics2D g2d) {
|
||||
g2d.setRenderingHint(
|
||||
RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
||||
|
@ -50,7 +50,7 @@ object Config {
|
||||
val allowedMedia: Set[String] = captchaConfig.flatMap(_.allowedMedia).toSet
|
||||
val allowedInputType: Set[String] = captchaConfig.flatMap(_.allowedInputType).toSet
|
||||
|
||||
HelperFunctions.seed = seed
|
||||
HelperFunctions.setSeed(seed)
|
||||
|
||||
private def getDefaultConfig(): String = {
|
||||
val defaultConfigMap =
|
||||
|
Loading…
x
Reference in New Issue
Block a user