From 813bb99952634740ad5d9c088fc564439127403b Mon Sep 17 00:00:00 2001 From: curry772 Date: Wed, 13 May 2026 13:53:17 +0900 Subject: [PATCH] =?UTF-8?q?test:=20CryptoModuleServiceTest=20DYNAMIC=20AES?= =?UTF-8?q?/CBC=20=EC=B6=9C=EB=A0=A5=20=EB=A1=9C=EA=B7=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../common/security/CryptoModuleServiceTest.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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); }