shimingxy 5 місяців тому
батько
коміт
a61cfef88a

+ 4 - 2
maxkey-starter/maxkey-starter-captcha/src/main/java/com/google/code/kaptcha/text/impl/RandomColorWordRenderer.java

@@ -38,6 +38,9 @@ import com.google.code.kaptcha.util.Configurable;
 public class RandomColorWordRenderer extends Configurable implements WordRenderer
 {
 	ConfigHelper configHelper = new ConfigHelper();
+	
+	Random random = new SecureRandom();
+	
 	/**
 	 * Renders a word to an image.
 	 * 
@@ -69,8 +72,7 @@ public class RandomColorWordRenderer extends Configurable implements WordRendere
 		g2D.setRenderingHints(hints);
 
 		FontRenderContext frc = g2D.getFontRenderContext();
-		Random random = new SecureRandom();
-
+		
 		int startPosY = (height - fontSize) / 5 + fontSize;
 
 		char[] wordChars = word.toCharArray();

+ 0 - 0
maxkey-starter/maxkey-starter-captcha/src/main/resources/kaptcha_d.properties → maxkey-starter/maxkey-starter-captcha/src/main/resources/kaptcha_default.properties


+ 0 - 0
maxkey-starter/maxkey-starter-captcha/src/main/resources/kaptcha_c.properties → maxkey-starter/maxkey-starter-captcha/src/main/resources/kaptcha_randomcolor.properties