Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 민생회복
- Spring Batch 강의
- 자동포맷팅
- Ai
- python
- java
- Vue 알아보기
- 개발툴팁
- 배당소득 분리과세
- IntelliJ
- 자바패턴
- scrapy
- MYSQL
- gradle
- Python 기본편
- 민생회복소비쿠폰
- AES256
- Spring
- 지원금신청방법
- 개발생산성
- intellij완전정복
- JetBrains
- 민생회복지원금
- 디버깅
- GPT
- Vue 강의
- Vue 배우기
- docker
- spring boot 시작
- 주식용어
Archives
나만의공간
암복호화 예제(AES) 본문
package hello;
import crypto.CipherUtils;
public class AesSample {
private static final String KEY_ALGORITHM = "AES";
private static final String CIPHER_ALGORITHM = "AES/ECB/ZeroBytePadding";
private static final String KEY_STRING = "abcdefgh01234567";
public static void main(String[] args) {
System.out.println("Key: " + KEY_STRING);
CipherUtils cu = new CipherUtils(KEY_ALGORITHM, CIPHER_ALGORITHM, KEY_STRING);
String data = "This is just an exampleaaaa"; System.out.println("Data: " + data);
try {
String encryptedHex = cu.encrypt(data);
System.out.println("Encrypted Hex: " + encryptedHex);
String decryptedData = cu.decrypt(encryptedHex);
System.out.println("Decrypted Data: " + decryptedData);
} catch (Exception e) {
// TODO Auto-generated catch block e.printStackTrace();
}
}
}
'IT' 카테고리의 다른 글
Slack 계정 비활성화 방법 (Slack App 기준) (0) | 2022.01.24 |
---|---|
티스토리 구글 애드센스 설정 방법 (0) | 2021.12.29 |
Apache Log4J 치명적 보안결함 발견 (0) | 2021.12.12 |
vue설치순서(맥 기준) (0) | 2021.05.20 |
Comments