diff --git a/src/test/java/com/eactive/eai/common/security/CryptoModuleServiceTest.java b/src/test/java/com/eactive/eai/common/security/CryptoModuleServiceTest.java index 7c7fca5..a01a7c9 100644 --- a/src/test/java/com/eactive/eai/common/security/CryptoModuleServiceTest.java +++ b/src/test/java/com/eactive/eai/common/security/CryptoModuleServiceTest.java @@ -143,11 +143,20 @@ class CryptoModuleServiceTest { Map runtimeCtx = new HashMap<>(); runtimeCtx.put("X-Api-Enc-Key", "clientKey0000001"); - byte[] plain = "DYNAMIC 키 서비스 테스트".getBytes(StandardCharsets.UTF_8); + byte[] plain = "{\"test\": \"DYNAMIC AES/CBC 테스트\"}".getBytes(StandardCharsets.UTF_8); byte[] encrypted = service.encrypt("DYN_SVC", runtimeCtx, plain); byte[] decrypted = service.decrypt("DYN_SVC", runtimeCtx, encrypted); - + + String encBase64 = Base64.getEncoder().encodeToString(encrypted); + String decBase64 = Base64.getEncoder().encodeToString(decrypted); + System.out.println("DYNAMIC AES/CBC"); + + System.out.println("plain:"+new String(plain)); + System.out.println("encBase64:"+encBase64); + System.out.println("decBase64:"+decBase64); + System.out.println("plain:"+new String(decrypted)); + assertArrayEquals(plain, decrypted); }