본문 바로가기

JAVA29

[AES 알고리즘] Input length must be multiple of 16 when decrypting with padded cipher 발생 시에 확인 해볼 사항 [AES 알고리즘] Input length must be multiple of 16 when decrypting with padded cipher 발생 시에 확인 해볼 사항 저 같은 경우 , 특정 파일을 byte Array로 읽어서 복호화 처리 시에 아래와 같은 Exception 이 발생 하였습니다. javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher 평문으로 된 String 이나 Byte 를 Encrypt 처리 시에 , AES 알고리즘으로 Encrypt를 처리 한 상태에서 추가적으로 Base64로 Encode 한 파일이나 String을 복호화 시도 시에 먼저.. 2021. 10. 21.
[전자정부프레임워크 3.9] @RequestBody 를 Nullable 처리 하기 출처입니다 : java - Use @RequestBody with optional body in latest Spring v4 - Stack Overflow Use @RequestBody with optional body in latest Spring v4 How do I make body optional in REST API calls when using @RequestBody annotation in Spring? With Spring's latest version, if you use @RequestBody annotation, it makes client to send body all the t... stackoverflow.com 아래와 같은 메서드를 테스트로 URL 만 호출 시에 해당 Cont.. 2021. 10. 19.
[JAVA] 문자열 길이 및 Byte 수 계산 [JAVA] 문자열 길이 및 Byte 수 계산 출처입니다 : [JAVA] String형 Bytes length 구하기 | 규니의 블로그 (hgko1207.github.io) 2021. 8. 23.
[JAVA] 현재 TimeStamp 값 얻기 예제 [JAVA] 현재 TimeStamp 값 얻기 예제 java.sql.Timestamp 를 이용 하였습니다. import java.sql.Timestamp; import java.time.LocalDateTime; public class TestClass { public static void main(String args[]) { Timestamp tmStamp = Timestamp.valueOf(LocalDateTime.now()); String messageID = String.format("%d" , tmStamp.getTime()); System.out.println(messageID); } } 2021. 8. 23.