|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.security.codec.Base64Helper
public class Base64Helper
Base64 Encoding/Decoding 기능 제공
| Constructor Summary | |
|---|---|
protected |
Base64Helper()
|
| Method Summary | |
|---|---|
static byte[] |
decode(byte[] content)
RFC 2045에서 정의한 것과 같이 Base64 decode를 지원한다. |
static String |
decode(String content)
RFC 2045에서 정의한 것과 같이 Base64 decode를 지원한다. |
static String |
decode(String content,
String charset)
RFC 2045에서 정의한 것과 같이 Base64 decode를 지원한다. |
static byte[] |
decodeSecure(byte[] content,
byte[] decodeKey)
|
static String |
decodeSecure(String content,
byte[] decodeKey)
|
static String |
decodeSecure(String content,
String charset,
byte[] decodeKey)
keycode 배열을 다르게하는 방식으로 암호화 Base64 디코딩을 처리한다. |
static byte[] |
encode(byte[] content)
RFC 2045에서 정의한 것과 같이 Base64 encode를 지원한다. |
static String |
encode(String content)
RFC 2045에서 정의한 것과 같이 Base64 encode를 지원한다. |
static String |
encode(String content,
String charset)
RFC 2045에서 정의한 것과 같이 Base64 encode를 지원한다. |
static byte[] |
encodeSecure(byte[] content,
byte[] encodeKey)
|
static String |
encodeSecure(String content,
byte[] encodeKey)
|
static String |
encodeSecure(String content,
String charset,
byte[] encodeKey)
keycode 배열을 다르게하는 방식으로 암호화 Base64 인코딩을 처리한다. |
static byte[] |
getDecodeKey(byte[] encodeKey)
encode용 keycode 테이블로부터 decode용 keycode 테이블을 생성한다. |
static byte[] |
getDecodeKey(String encodeKey)
|
static boolean |
isValid(String content,
String encodedContent)
Base64 encoding된 Data와 실 Data의 비교. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Base64Helper()
| Method Detail |
|---|
public static String encode(String content)
RFC 2045에서 정의한 것과 같이 Base64 encode를 지원한다.
content - Base64 encoding 하고자 하는 Data
public static String encode(String content,
String charset)
throws UnsupportedEncodingException
RFC 2045에서 정의한 것과 같이 Base64 encode를 지원한다. encode할 byte[]를 생성할 때 charset을 지정한다.
content - Base64 encoding 하고자 하는 Data
UnsupportedEncodingExceptionpublic static byte[] encode(byte[] content)
RFC 2045에서 정의한 것과 같이 Base64 encode를 지원한다.
content - Base64 encoding 하고자 하는 binary의 byte array
public static String decode(String content)
RFC 2045에서 정의한 것과 같이 Base64 decode를 지원한다.
content - Base64 decoding 하고자 하는 Data
public static String decode(String content,
String charset)
throws UnsupportedEncodingException
RFC 2045에서 정의한 것과 같이 Base64 decode를 지원한다. byte[]를 String으로 변환할 때 사용할 charset을 지정한다.
content - Base64 decoding 하고자 하는 Data
UnsupportedEncodingExceptionpublic static byte[] decode(byte[] content)
RFC 2045에서 정의한 것과 같이 Base64 decode를 지원한다.
content - Base64 decoding 하고자 하는 문자열의 byte array
public static boolean isValid(String content,
String encodedContent)
Base64 encoding된 Data와 실 Data의 비교.
content - 실 DataenccodedContent - Base64 encoding된 Data
public static String encodeSecure(String content,
String charset,
byte[] encodeKey)
throws UnsupportedEncodingException
content - charset - encodeKey - Base64 인코딩용 문자배열 (65 bytes length)
예)"GHIJuv45h7x6D3NOPQREFyz012STpqUVWXYZabc89+/KLMwdefgABCijklmnorst=".getBytes()
UnsupportedEncodingException
public static String encodeSecure(String content,
byte[] encodeKey)
public static byte[] encodeSecure(byte[] content,
byte[] encodeKey)
public static String decodeSecure(String content,
String charset,
byte[] decodeKey)
throws UnsupportedEncodingException
content - charset - decodeKey - Base64 디코딩용 문자배열 (64 bytes length), 인코딩 시 사용한 Key로부터
getDecodeKey() 메소드를 사용하여 생성할 수 있다.
예)Base64Helper.getDecodeKey("GHIJuv45h7x6D3NOPQREFyz012STpqUVWXYZabc89+/KLMwdefgABCijklmnorst".getBytes());
UnsupportedEncodingException
public static String decodeSecure(String content,
byte[] decodeKey)
public static byte[] decodeSecure(byte[] content,
byte[] decodeKey)
public static byte[] getDecodeKey(String encodeKey)
public static byte[] getDecodeKey(byte[] encodeKey)
encodeKey - (64 bytes)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||