test: CryptoModuleServiceTest DYNAMIC AES/CBC 출력 로그 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -143,11 +143,20 @@ class CryptoModuleServiceTest {
|
||||
Map<String, String> 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user