You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
862 B
21 lines
862 B
/********************************************************************************************************* |
|
* 프로그램명 : MRandom.java 프로그램설명 : 문자관련 util 기능 제공 작성자 : 강원중 작성일 : 2003.12.09 변경일 : 2003.12.09 |
|
**********************************************************************************************************/ |
|
|
|
package kr.co.kihyun.util; |
|
|
|
import java.security.SecureRandom; |
|
//import java.util.*; |
|
|
|
public class MRandom { |
|
public static int getInt(int cip) { |
|
//51.적절하지 않은 난수 값 사용(java.util.Random)_CWE-330 : Update by YOUNGJUN,CHO |
|
/* |
|
Random rd = new Random(); |
|
return rd.nextInt() % cip; |
|
*/ |
|
SecureRandom sr = new SecureRandom(); |
|
return sr.nextInt() % cip; |
|
//================================================ |
|
} |
|
}
|
|
|