보안/개발보안
보안약점 진단 #3
^..^v
2020. 7. 12. 01:48
728x90
반응형
01 private static final boolean PRIVATE_STATIC_FINAL_TRUE = true;
02 private static final boolean PRIVATE_STATIC_FINAL_FALSE = false;
03
04 public void do(String password) throws Throwable {
05 if (password == null) {
06 return;
07 }
08 if (PRIVATE_STATIC_FINAL_TRUE) {
09 MessageDigest hash = MessageDigest.getInstance("SHA-512");
10 byte[] hashValue = hash.digest(password.getBytes("UTF-8"));
11 IO.writeLine(IO.toHex(hashValue));
12 }
13 }
728x90
반응형