본문 바로가기
보안/개발보안

보안약점 진단 #3

by ^..^v 2020. 7. 12.
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
반응형

'보안 > 개발보안' 카테고리의 다른 글

보안약점 진단 #5  (0) 2020.07.12
보안약점 진단 #4  (0) 2020.07.12
보안약점 진단 #2  (0) 2020.07.12
보안약점 진단 #1  (0) 2020.07.12
주요 취약점 DB  (0) 2019.11.14

댓글