File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
2024-11-14
File name
Commit message
Commit date
File name
Commit message
Commit date
package itn.let.utl.user.service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
/**
*
* 파일 체크에 대한 Util 클래스
* @author 사업기술본부 조용준(ITN)
* @since 2021.07.16
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2021.07.16 조용준 최초 생성 *
*
* </pre>
*/
@Controller
public class SecuKeyUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(CheckBoardUtil.class);
//make secu key
public static String makeKey(
int p_start_length
, int p_end_length
, String p_key_type //H or ELSE
) throws Exception{
LOGGER.debug("SecuKeyUtil.makeKey()");
String v_ret="";
int p_length = (int )(Math.random() * (p_end_length-p_start_length+1) + p_start_length);//5~14 - length
int p_random;
if ("H".equals(p_key_type)) {
for (int i=0;i<p_length;i++){
p_random = (int )(Math.random() * 15);//0~9
v_ret +=Integer.toHexString(p_random);
//v_ret +=Integer.toString(random2);
}
}else {
for (int i=0;i<p_length;i++){
p_random = (int )(Math.random() * 9);//0~9
//v_ret +=Integer.toHexString(random2);
v_ret +=Integer.toString(p_random);
}
}
return v_ret;
}
}