소스정리 커밋
This commit is contained in:
parent
bc2f6ebe0c
commit
0078c89323
@ -44,7 +44,8 @@ public class BoardDAO extends DataApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO selectQnA(DataApiReqVO reqVO) {
|
public DataApiResVO selectQnA(DataApiReqVO reqVO) {
|
||||||
return null;
|
reqVO.setReqUrl(RESOURCE_URI);
|
||||||
|
return get(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO verifyWriter(DataApiReqVO reqVO) {
|
public DataApiResVO verifyWriter(DataApiReqVO reqVO) {
|
||||||
@ -52,7 +53,8 @@ public class BoardDAO extends DataApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO updateQnA(DataApiReqVO reqVO) {
|
public DataApiResVO updateQnA(DataApiReqVO reqVO) {
|
||||||
return null;
|
reqVO.setReqUrl(RESOURCE_URI);
|
||||||
|
return post(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO deleteQnA(DataApiReqVO reqVO) {
|
public DataApiResVO deleteQnA(DataApiReqVO reqVO) {
|
||||||
@ -60,7 +62,8 @@ public class BoardDAO extends DataApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO insertQnA(DataApiReqVO reqVO) {
|
public DataApiResVO insertQnA(DataApiReqVO reqVO) {
|
||||||
return null;
|
reqVO.setReqUrl(RESOURCE_URI);
|
||||||
|
return put(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,11 +43,11 @@ public class BoardServiceImpl implements BoardService
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO selectQnA(DataApiReqVO reqVO) {
|
public DataApiResVO selectQnA(DataApiReqVO reqVO) {
|
||||||
return null;
|
return boardDAO.selectQnA(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO insertQnA(DataApiReqVO reqVO) {
|
public DataApiResVO insertQnA(DataApiReqVO reqVO) {
|
||||||
return null;
|
return boardDAO.insertQnA(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO verifyWriter(DataApiReqVO reqVO) {
|
public DataApiResVO verifyWriter(DataApiReqVO reqVO) {
|
||||||
@ -55,7 +55,7 @@ public class BoardServiceImpl implements BoardService
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO updateQnA(DataApiReqVO reqVO) {
|
public DataApiResVO updateQnA(DataApiReqVO reqVO) {
|
||||||
return null;
|
return boardDAO.updateQnA(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataApiResVO deleteQnA(DataApiReqVO reqVO) {
|
public DataApiResVO deleteQnA(DataApiReqVO reqVO) {
|
||||||
|
|||||||
@ -18,12 +18,15 @@ import org.springframework.ui.ModelMap;
|
|||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import nlib.bbs.service.BoardService;
|
import nlib.bbs.service.BoardService;
|
||||||
import nlib.cmm.NlibCommonController;
|
import nlib.cmm.NlibCommonController;
|
||||||
|
import nlib.cmm.crypto.AriaCrypto;
|
||||||
|
import nlib.cmm.crypto.NlibPasswordEncoder;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.restful.service.DataApiReqVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.restful.service.DataApiResVO;
|
||||||
|
import nlib.user.service.NlibLoginVO;
|
||||||
|
import nlib.util.StringUtil;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class BoardController extends NlibCommonController
|
public class BoardController extends NlibCommonController
|
||||||
@ -33,6 +36,13 @@ public class BoardController extends NlibCommonController
|
|||||||
@Resource(name = "boardService")
|
@Resource(name = "boardService")
|
||||||
private BoardService boardService;
|
private BoardService boardService;
|
||||||
|
|
||||||
|
@Resource(name = "nlibPasswordEncoder")
|
||||||
|
private NlibPasswordEncoder nlibPasswordEncoder;
|
||||||
|
|
||||||
|
@Resource(name = "ariaCrypto")
|
||||||
|
private AriaCrypto ariaCrypto;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AuthenticationManager authenticationManager;
|
private AuthenticationManager authenticationManager;
|
||||||
|
|
||||||
@ -77,7 +87,16 @@ public class BoardController extends NlibCommonController
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/board/listQnAs.do")
|
@RequestMapping("/board/listQnAs.do")
|
||||||
public String listQnAs(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> commandMap, ModelMap model) {
|
public String listQnAs(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||||
|
|
||||||
|
String searchKeyword = paramMap.get("searchKeyword");
|
||||||
|
String pageNo = paramMap.get("pageNo");
|
||||||
|
String pageRows = paramMap.get("pageRows");
|
||||||
|
|
||||||
|
// 반환 정보
|
||||||
|
model.addAttribute("pageNo" , pageNo);
|
||||||
|
model.addAttribute("pageRows" , pageRows);
|
||||||
|
model.addAttribute("searchKeyword", searchKeyword);
|
||||||
|
|
||||||
return "nlib/board/listQnAs";
|
return "nlib/board/listQnAs";
|
||||||
}
|
}
|
||||||
@ -98,26 +117,26 @@ public class BoardController extends NlibCommonController
|
|||||||
|
|
||||||
log.debug("listQnAs > pageNo = " + pageNo);
|
log.debug("listQnAs > pageNo = " + pageNo);
|
||||||
log.debug("listQnAs > pageRows = " + pageRows);
|
log.debug("listQnAs > pageRows = " + pageRows);
|
||||||
log.debug("listQnAs > keyword = " + searchKeyword);
|
log.debug("listQnAs > searchKeyword = " + searchKeyword);
|
||||||
|
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(getAuthKey(authentication));
|
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||||
reqVO.setPageNo(pageNo);
|
reqVO.setPageNo(pageNo);
|
||||||
reqVO.setPageRows(pageRows);
|
reqVO.setPageRows(pageRows);
|
||||||
|
|
||||||
// 추가 정보 설정
|
// 추가 정보 설정
|
||||||
HashMap<String, Object> info = new HashMap<String, Object>();
|
HashMap<String, Object> info = new HashMap<String, Object>();
|
||||||
info.put("keyword", searchKeyword);
|
info.put("searchKeyword", searchKeyword);
|
||||||
reqVO.setInfo(info);
|
reqVO.setInfo(info);
|
||||||
|
|
||||||
// 요청
|
// 요청
|
||||||
DataApiResVO resVO = boardService.listQnAs(reqVO);
|
DataApiResVO resVO = boardService.listQnAs(reqVO);
|
||||||
|
|
||||||
// JSON변환 응답 처리
|
// JSON변환 응답 처리
|
||||||
return makeResponseEntityJson(resVO);
|
return makeResponseEntityJson(resVO.getList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -128,7 +147,48 @@ public class BoardController extends NlibCommonController
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/board/selectQnA.do")
|
@RequestMapping("/board/selectQnA.do")
|
||||||
public String selectQnA(HttpServletRequest req) {
|
public String selectQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||||
|
|
||||||
|
// 목록 이동시 전달할 매개변수
|
||||||
|
String searchKeyword = paramMap.get("searchKeyword");
|
||||||
|
String pageNo = paramMap.get("pageNo");
|
||||||
|
String pageRows = paramMap.get("pageRows");
|
||||||
|
|
||||||
|
// 게시물 번호
|
||||||
|
String articleNo = paramMap.get("articleNo");
|
||||||
|
|
||||||
|
log.debug("selectQnA > pageNo = " + pageNo);
|
||||||
|
log.debug("selectQnA > pageRows = " + pageRows);
|
||||||
|
log.debug("selectQnA > searchKeyword = " + searchKeyword);
|
||||||
|
log.debug("selectQnA > articleNo = " + articleNo);
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// REQ VO 구성
|
||||||
|
//-------------------------------
|
||||||
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
|
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||||
|
reqVO.setPageNo(pageNo);
|
||||||
|
reqVO.setPageRows(pageRows);
|
||||||
|
|
||||||
|
// 추가 정보 설정 : 게시판ID, 게시물번호
|
||||||
|
HashMap<String, Object> info = new HashMap<String, Object>();
|
||||||
|
info.put("boardNo", "QNA");
|
||||||
|
info.put("articleNo", articleNo);
|
||||||
|
reqVO.setInfo(info);
|
||||||
|
|
||||||
|
// 요청
|
||||||
|
DataApiResVO resVO = boardService.selectQnA(reqVO);
|
||||||
|
|
||||||
|
// 반환 정보
|
||||||
|
model.addAttribute("articleNo" , articleNo);
|
||||||
|
model.addAttribute("article" , resVO.getInfo());
|
||||||
|
model.addAttribute("preArticle" , resVO.getList().get(0));
|
||||||
|
model.addAttribute("nextArticle" , resVO.getList().get(1));
|
||||||
|
|
||||||
|
model.addAttribute("pageNo" , pageNo);
|
||||||
|
model.addAttribute("pageRows" , pageRows);
|
||||||
|
model.addAttribute("searchKeyword", searchKeyword);
|
||||||
|
|
||||||
return "nlib/board/selectQnA";
|
return "nlib/board/selectQnA";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,13 +199,46 @@ public class BoardController extends NlibCommonController
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/board/insertQnAForm.do")
|
@RequestMapping("/board/insertQnAForm.do")
|
||||||
public String insertQnAForm(HttpServletRequest req) {
|
public String insertQnAForm(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||||
|
|
||||||
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
model.addAttribute("regUserName", loginVO.getName());
|
||||||
|
model.addAttribute("email", loginVO.getEmail());
|
||||||
|
|
||||||
return "nlib/board/insertQnAForm";
|
return "nlib/board/insertQnAForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/board/insertQnA.do")
|
@RequestMapping("/board/insertQnA.do")
|
||||||
public String insertQnA(HttpServletRequest req) {
|
public String insertQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||||
return "nlib/board/insertQnA";
|
|
||||||
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
|
||||||
|
log.debug("paramMap > " + paramMap);
|
||||||
|
|
||||||
|
String message = null;
|
||||||
|
String authKey = createAuthKey(req, authentication);
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// REQ VO 구성
|
||||||
|
//-------------------------------
|
||||||
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
|
reqVO.setAuthKey(authKey);
|
||||||
|
reqVO.addInfoItem("boardNo" , "QNA");
|
||||||
|
reqVO.addInfoItem("title" , paramMap.get("title"));
|
||||||
|
reqVO.addInfoItem("regUserName" , paramMap.get("regUserName"));
|
||||||
|
reqVO.addInfoItem("email" , paramMap.get("email"));
|
||||||
|
reqVO.addInfoItem("contentQeust", paramMap.get("contentQeust"));
|
||||||
|
|
||||||
|
// 요청
|
||||||
|
DataApiResVO resVO = boardService.insertQnA(reqVO);
|
||||||
|
|
||||||
|
// 처리결과 확인
|
||||||
|
if(!resVO.isSuccess()) {
|
||||||
|
message = resVO.getResultMessage();
|
||||||
|
return "redirect:/board/insertQnAForm.do";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "redirect:nlib/board/listQnAs";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/board/verifyWriter.do")
|
@RequestMapping("/board/verifyWriter.do")
|
||||||
@ -154,13 +247,134 @@ public class BoardController extends NlibCommonController
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/board/updateQnAForm.do")
|
@RequestMapping("/board/updateQnAForm.do")
|
||||||
public String updateQnAForm(HttpServletRequest req) {
|
public String updateQnAForm(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||||
|
|
||||||
|
// 목록 이동시 전달할 매개변수
|
||||||
|
String searchKeyword = paramMap.get("searchKeyword");
|
||||||
|
String pageNo = paramMap.get("pageNo");
|
||||||
|
String pageRows = paramMap.get("pageRows");
|
||||||
|
|
||||||
|
// 게시물 번호
|
||||||
|
String articleNo = paramMap.get("articleNo");
|
||||||
|
String articlePassword = paramMap.get("articlePassword");
|
||||||
|
|
||||||
|
log.debug("updateQnAForm > pageNo = " + pageNo);
|
||||||
|
log.debug("updateQnAForm > pageRows = " + pageRows);
|
||||||
|
log.debug("updateQnAForm > searchKeyword = " + searchKeyword);
|
||||||
|
log.debug("updateQnAForm > articleNo = " + articleNo);
|
||||||
|
log.debug("updateQnAForm > articlePassword = " + articlePassword);
|
||||||
|
|
||||||
|
if(StringUtil.isEmpty(articlePassword)) {
|
||||||
|
model.addAttribute("message", "비밀빈호가 올바르지 않습니다.(1)");
|
||||||
|
return "redirect:/board/selectQnA.do";
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// REQ VO 구성
|
||||||
|
//-------------------------------
|
||||||
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
|
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||||
|
reqVO.setPageNo(pageNo);
|
||||||
|
reqVO.setPageRows(pageRows);
|
||||||
|
|
||||||
|
// 추가 정보 설정 : 게시판ID, 게시물번호
|
||||||
|
HashMap<String, Object> info = new HashMap<String, Object>();
|
||||||
|
info.put("boardNo", "QNA");
|
||||||
|
info.put("articleNo", articleNo);
|
||||||
|
reqVO.setInfo(info);
|
||||||
|
|
||||||
|
// 요청
|
||||||
|
DataApiResVO resVO = boardService.selectQnA(reqVO);
|
||||||
|
|
||||||
|
// 비밀번호 확인
|
||||||
|
HashMap<String, Object> article = resVO.getInfo();
|
||||||
|
if(!articlePassword.equals(article.get("articlePassword"))) {
|
||||||
|
model.addAttribute("message", "비밀빈호가 올바르지 않습니다.(1)");
|
||||||
|
return "redirect:/board/selectQnA.do";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 반환 정보
|
||||||
|
model.addAttribute("articleNo" , articleNo);
|
||||||
|
model.addAttribute("article" , resVO.getInfo());
|
||||||
|
|
||||||
|
// 게시글 비밀번호 처리
|
||||||
|
String shaArticlePassword = nlibPasswordEncoder.encode(articlePassword);
|
||||||
|
String encArticlePassword = ariaCrypto.encode(shaArticlePassword, createAuthKey(req, authentication));
|
||||||
|
model.addAttribute("encArticlePassword", encArticlePassword);
|
||||||
|
|
||||||
|
// 검색 정보
|
||||||
|
model.addAttribute("pageNo" , pageNo);
|
||||||
|
model.addAttribute("pageRows" , pageRows);
|
||||||
|
model.addAttribute("searchKeyword", searchKeyword);
|
||||||
|
|
||||||
return "nlib/board/updateQnAForm";
|
return "nlib/board/updateQnAForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/board/updateQnA.do")
|
@RequestMapping("/board/updateQnA.do")
|
||||||
public String updateQnA(HttpServletRequest req) {
|
public String updateQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||||
return "nlib/board/updateQnA";
|
|
||||||
|
log.debug("paramMap > " + paramMap);
|
||||||
|
|
||||||
|
String message = null;
|
||||||
|
String authKey = createAuthKey(req, authentication);
|
||||||
|
|
||||||
|
// 목록 이동시 전달할 매개변수
|
||||||
|
String searchKeyword = paramMap.get("searchKeyword");
|
||||||
|
String pageNo = paramMap.get("pageNo");
|
||||||
|
String pageRows = paramMap.get("pageRows");
|
||||||
|
|
||||||
|
// 게시물 번호
|
||||||
|
String articleNo = paramMap.get("articleNo");
|
||||||
|
String encArticlePassword = paramMap.get("encArticlePassword");
|
||||||
|
String checkArticlePassword = ariaCrypto.decode(encArticlePassword, authKey);
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// 비밀번호 유효 체크
|
||||||
|
//-------------------------------
|
||||||
|
// 기존 정보 조회
|
||||||
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
|
reqVO.setAuthKey(authKey);
|
||||||
|
reqVO.addInfoItem("articleNo", articleNo);
|
||||||
|
|
||||||
|
DataApiResVO resVO = boardService.selectQnA(reqVO);
|
||||||
|
String oldArticlePassword = resVO.getInfoItem("articlePassword");
|
||||||
|
if(checkArticlePassword == null || !checkArticlePassword.equals(oldArticlePassword)) {
|
||||||
|
message = "잘못된 접근입니다.";
|
||||||
|
// TODO 수정화면으로 다시 redirect 시킬것
|
||||||
|
return "redirect:/board/updateQnAForm.do";
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// REQ VO 구성
|
||||||
|
//-------------------------------
|
||||||
|
DataApiReqVO updateReqVO = new DataApiReqVO();
|
||||||
|
updateReqVO.setAuthKey(authKey);
|
||||||
|
updateReqVO.addInfoItem("boardNo" , "QNA");
|
||||||
|
updateReqVO.addInfoItem("articleNo" , articleNo);
|
||||||
|
updateReqVO.addInfoItem("title" , paramMap.get("title"));
|
||||||
|
updateReqVO.addInfoItem("regUserName" , paramMap.get("regUserName"));
|
||||||
|
updateReqVO.addInfoItem("email" , paramMap.get("email"));
|
||||||
|
updateReqVO.addInfoItem("contentQeust", paramMap.get("contentQeust"));
|
||||||
|
|
||||||
|
// 요청
|
||||||
|
DataApiResVO updateResVO = boardService.updateQnA(updateReqVO);
|
||||||
|
|
||||||
|
// 처리결과 확인
|
||||||
|
if(!updateResVO.isSuccess()) {
|
||||||
|
message = updateResVO.getResultMessage();
|
||||||
|
return "redirect:/board/updateQnAForm.do";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 반환 정보
|
||||||
|
model.addAttribute("articleNo" , updateResVO.getInfoItem("articleNo")); // 신규등록된 게시물 ID
|
||||||
|
model.addAttribute("article" , resVO.getInfo());
|
||||||
|
|
||||||
|
// 검색 정보
|
||||||
|
model.addAttribute("pageNo" , pageNo);
|
||||||
|
model.addAttribute("pageRows" , pageRows);
|
||||||
|
model.addAttribute("searchKeyword", searchKeyword);
|
||||||
|
|
||||||
|
return "redirect:nlib/board/selectQnA";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/board/deleteQnA.do")
|
@RequestMapping("/board/deleteQnA.do")
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
import egovframework.rte.fdl.cryptography.EgovPasswordEncoder;
|
import egovframework.rte.fdl.cryptography.EgovPasswordEncoder;
|
||||||
import egovframework.rte.fdl.cryptography.impl.EgovARIACryptoServiceImpl;
|
import egovframework.rte.fdl.cryptography.impl.EgovARIACryptoServiceImpl;
|
||||||
|
import nlib.cmm.service.NlibProperty;
|
||||||
import nlib.sample.web.SampleEncoderController;
|
import nlib.sample.web.SampleEncoderController;
|
||||||
import nlib.util.StringUtil;
|
import nlib.util.StringUtil;
|
||||||
|
|
||||||
@ -41,8 +42,7 @@ public class AriaCrypto {
|
|||||||
/**
|
/**
|
||||||
* 암호처리 시, 기본 키
|
* 암호처리 시, 기본 키
|
||||||
*/
|
*/
|
||||||
@Value("#{properties['crypto.aria.defaultKey']}")
|
private static String ARIA_DEFAULT_KEY = NlibProperty.getProperty("crypto.aria.defaultKey");
|
||||||
private String ARIA_DEFAULT_KEY;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 기본키를 가지고 암호화한다.
|
* 기본키를 가지고 암호화한다.
|
||||||
@ -50,7 +50,7 @@ public class AriaCrypto {
|
|||||||
* @param value
|
* @param value
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String encode(String value) {
|
public static String encode(String value) {
|
||||||
log.info("encode : 암호화에 사용할 키 정보가 없으므로 기본키 정보를 사용합니다 : " + ARIA_DEFAULT_KEY);
|
log.info("encode : 암호화에 사용할 키 정보가 없으므로 기본키 정보를 사용합니다 : " + ARIA_DEFAULT_KEY);
|
||||||
return encode(value, ARIA_DEFAULT_KEY);
|
return encode(value, ARIA_DEFAULT_KEY);
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ public class AriaCrypto {
|
|||||||
* @param key
|
* @param key
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String encode(String value, String key) {
|
public static String encode(String value, String key) {
|
||||||
|
|
||||||
if(StringUtil.isEmpty(value)) {
|
if(StringUtil.isEmpty(value)) {
|
||||||
log.error("encode : 암호화할 문자열 정보가 없습니다.");
|
log.error("encode : 암호화할 문자열 정보가 없습니다.");
|
||||||
@ -93,7 +93,7 @@ public class AriaCrypto {
|
|||||||
* @param value
|
* @param value
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String decode(String value) {
|
public static String decode(String value) {
|
||||||
log.info("decode : 복호화에 사용할 키 정보가 없으므로 기본키 정보를 사용합니다 : " + ARIA_DEFAULT_KEY);
|
log.info("decode : 복호화에 사용할 키 정보가 없으므로 기본키 정보를 사용합니다 : " + ARIA_DEFAULT_KEY);
|
||||||
return decode(value, ARIA_DEFAULT_KEY);
|
return decode(value, ARIA_DEFAULT_KEY);
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ public class AriaCrypto {
|
|||||||
* @param key
|
* @param key
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String decode(String value, String key) {
|
public static String decode(String value, String key) {
|
||||||
|
|
||||||
if(StringUtil.isEmpty(value)) {
|
if(StringUtil.isEmpty(value)) {
|
||||||
log.error("decode : 복호화할 암호문자열 정보가 없습니다.");
|
log.error("decode : 복호화할 암호문자열 정보가 없습니다.");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user