//public static final String SYSTEM_AES_KEY = "kk9w1eank8q9lidj"; // AES 암복호화키(외부용)
// jsp code
<script th:src="${@environment.getProperty('static.url') + '/htdocs/dist/js/aes.js'}" type="text/javascript"></script>
<script th:src="${@environment.getProperty('static.url') + '/htdocs/dist/js/aesCryptUtil.js'}" type="text/javascript"></script>
var _encKey = /*[[${T(com.shinhanpg.admin.manager.common.constants.GlobalConstants).SYSTEM_AES_KEY}]]*/ '';
let key = _encKey.substring(0,16);
let currPwd = CryptoJS.AES.encrypt($("#inpCurrPwd").val(), key).toString();
let pwd = CryptoJS.AES.encrypt($("#inpNewPwd").val(), key).toString();
let rePwd = CryptoJS.AES.encrypt($("#inpReNewPwd").val(), key).toString();
// java code
AESCryptUtil aesCryptUtil = new AESCryptUtil(GlobalConstants.SYSTEM_AES_KEY);
String pwd, encPwd;
encPwd = administrator.getNewPwd();
try {
pwd = aesCryptUtil.decAES(administrator.getNewPwd());
administrator.setNewPwd(pwd);
} catch (Exception e) {
throw new GlobalException("비밀번호 AES 복호화시 오류", true);
}