瀏覽代碼

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();