소스 검색

isNotBlank 수정

jsshin 4 년 전
부모
커밋
efb5dae623
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/style24/core/support/util/CryptoUtils.java

+ 1 - 1
src/main/java/com/style24/core/support/util/CryptoUtils.java

@@ -155,7 +155,7 @@ public class CryptoUtils {
 		String encryptedValue = "";
 
 		try {
-			if (rawValue != null) {
+			if (StringUtils.isNotBlank(rawValue)) {
 				final Cipher cipher = Cipher.getInstance("AES"); // Cipher.getInstance("AES/ECB/PKCS5Padding")와 같음. ECB 모드의 경우 cipher.init 시 IvParameterSpec을 넣음 안 된다.
 				cipher.init(Cipher.ENCRYPT_MODE, generateMysqlAESKey("UTF-8"));
 				encryptedValue = new String(Hex.encodeHex(cipher.doFinal(rawValue.getBytes("UTF-8")))).toUpperCase();