public class GlueCipher extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_KEY_FILE
Deprecated.
|
static String |
GLUE_CIPHER_FILE |
Constructor and Description |
---|
GlueCipher() |
Modifier and Type | Method and Description |
---|---|
static String |
decrypt(String encryptedString)
문자열 대칭 복호화.
|
static String |
decrypt(String encryptedString,
File key)
복호화
|
static void |
decryptFile(String infile,
String outfile)
파일 대칭 복호화.
|
static void |
decryptFile(String infile,
String outfile,
File key) |
static String |
encrypt(String unencryptedString)
주어진 문자열을 DEFAULT_KEY_FILE로 암호화.
|
static String |
encrypt(String unencryptedString,
File key)
주어진 문자열을 주어진 Key 파일로 암호화.
|
static void |
encryptFile(String infile,
String outfile)
파일 대칭 암호화.
|
static void |
encryptFile(String infile,
String outfile,
File key) |
static File |
makekey()
Deprecated.
|
static File |
makekey(String filename)
주어진 파일명으로 Key 생성
|
static void |
reset()
Deprecated.
|
public static final String GLUE_CIPHER_FILE
@Deprecated public static final String DEFAULT_KEY_FILE
@Deprecated public static void reset()
@Deprecated public static File makekey() throws IOException, NoSuchAlgorithmException
IOException
NoSuchAlgorithmException
public static File makekey(String filename) throws IOException, NoSuchAlgorithmException
filename
- 전체경로IOException
- I/O ErrorNoSuchAlgorithmException
- java security Errorpublic static String encrypt(String unencryptedString) throws BadPaddingException, IllegalBlockSizeException
unencryptedString
- 비밀키 암호화를 희망하는 문자열BadPaddingException
IllegalBlockSizeException
public static String encrypt(String unencryptedString, File key) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, FileNotFoundException
unencryptedString
- 문자열key
- 파일NoSuchPaddingException
NoSuchAlgorithmException
InvalidKeyException
BadPaddingException
IllegalBlockSizeException
FileNotFoundException
public static String decrypt(String encryptedString) throws BadPaddingException, IllegalBlockSizeException
encryptedString
- 비밀키 복호화를 희망하는 문자열BadPaddingException
IllegalBlockSizeException
public static String decrypt(String encryptedString, File key) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException
encryptedString
- 복호화를 희망하는 문자열key
- 비밀키NoSuchPaddingException
NoSuchAlgorithmException
InvalidKeyException
BadPaddingException
IllegalBlockSizeException
public static void encryptFile(String infile, String outfile) throws IOException
infile
- 암호화을 희망하는 파일명outfile
- 암호화된 파일명IOException
public static void encryptFile(String infile, String outfile, File key) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, IOException
infile
- outfile
- key
- NoSuchPaddingException
NoSuchAlgorithmException
InvalidKeyException
IOException
public static void decryptFile(String infile, String outfile) throws IOException
infile
- 복호화을 희망하는 파일명outfile
- 복호화된 파일명IOException
public static void decryptFile(String infile, String outfile, File key) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, IOException
Copyright © 2023–2024 POSCO DX. All rights reserved.