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
- JDK1.3
- 미국 배당주
- AES256
- Spring Batch
- docker 명령어
- Vue 배우기
- 미국주식
- 애드센스 수익
- gradle
- Vue 강의
- 도커
- Python 기본편
- 구글 애드센스 수익
- Vue 알아보기
- scrapy
- apache log4j
- spring boot 시작
- MYSQL
- docker mysql
- Spring
- Vue
- intelliJ plugin
- spring Annotation
- IntelliJ
- 티스토리 광고 수익
- docker
- python 기초
- python
- 젠킨스
- Spring Batch 강의
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