Notice
Recent Posts
Recent Comments
Link
나만의공간
암복호화 예제(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' 카테고리의 다른 글
| 윈도우 화면 캡쳐 방법 (0) | 2025.07.09 |
|---|---|
| Slack 계정 비활성화 방법 (Slack App 기준) (0) | 2022.01.24 |
| 티스토리 구글 애드센스 설정 방법 (0) | 2021.12.29 |
| Apache Log4J 치명적 보안결함 발견 (0) | 2021.12.12 |
| vue설치순서(맥 기준) (0) | 2021.05.20 |
Comments
