|
|
@@ -2,6 +2,7 @@ package com.xunmei.gateway.config;
|
|
|
|
|
|
import com.google.code.kaptcha.text.impl.DefaultTextCreator;
|
|
|
|
|
|
+import java.security.SecureRandom;
|
|
|
import java.util.Random;
|
|
|
|
|
|
/**
|
|
|
@@ -17,7 +18,8 @@ public class KaptchaTextCreator extends DefaultTextCreator
|
|
|
public String getText()
|
|
|
{
|
|
|
Integer result = 0;
|
|
|
- Random random = new Random();
|
|
|
+ /*Random random = new Random();*/
|
|
|
+ SecureRandom random = new SecureRandom();
|
|
|
int x = random.nextInt(10);
|
|
|
int y = random.nextInt(10);
|
|
|
StringBuilder suChinese = new StringBuilder();
|