Index: /trunk/include/cf_base.h
===================================================================
--- /trunk/include/cf_base.h	(revision 127)
+++ /trunk/include/cf_base.h	(revision 128)
@@ -1,5 +1,7 @@
 /**
- * \file	cf_base.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_base.h
+ *
+ * \author myusgun <myusgun@gmail.com>
+ *
  * \version	0.1
  *
Index: /trunk/include/cf_bitwise.h
===================================================================
--- /trunk/include/cf_bitwise.h	(revision 128)
+++ /trunk/include/cf_bitwise.h	(revision 128)
@@ -0,0 +1,58 @@
+/**
+ * \file cf_bitwise.h
+ *
+ * \author myusgun <myusgun@gmail.com>
+ * \author chevalier <achagun@gmail.com>
+ *
+ * \brief 비트 연산자
+ */
+#ifndef __CF_BITWISE_H__
+#define __CF_BITWISE_H__
+
+#include "cf_base.h"
+#include "cf_type.h"
+
+#include <stddef.h>
+
+CF_EXPORT int
+CF_Bitwise_ShiftLeft		(cf_byte	* in,
+							 cf_byte	* out,
+							 size_t		size,
+							 size_t		offset);
+CF_EXPORT int
+CF_Bitwise_ShiftRight		(cf_byte	* in,
+							 cf_byte	* out,
+							 size_t		size,
+							 size_t		offset);
+
+CF_EXPORT int
+CF_Bitwise_RotateLeft		(cf_byte	* in,
+							 cf_byte	* out,
+							 size_t		size,
+							 size_t		offset);
+
+CF_EXPORT int
+CF_Bitwise_RotateRight		(cf_byte	* in,
+							 cf_byte	* out,
+							 size_t		size,
+							 size_t		offset);
+
+CF_EXPORT int
+CF_Bitwise_AND				(cf_byte	* in1,
+							 cf_byte	* in2,
+							 size_t		size,
+							 cf_byte	* out);
+
+CF_EXPORT int
+CF_Bitwise_OR				(cf_byte	* in1,
+							 cf_byte	* in2,
+							 size_t		size,
+							 cf_byte	* out);
+
+CF_EXPORT int
+CF_Bitwise_XOR				(cf_byte	* in1,
+							 cf_byte	* in2,
+							 size_t		size,
+							 cf_byte	* out);
+
+#endif // #ifndef __CF_BITWISE_H__
Index: /trunk/include/cf_codec.h
===================================================================
--- /trunk/include/cf_codec.h	(revision 127)
+++ /trunk/include/cf_codec.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_codec.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_codec.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 데이터 변환
@@ -11,4 +12,5 @@
 
 #include "cf_base.h"
+#include "cf_type.h"
 
 #include <stddef.h>
@@ -19,22 +21,22 @@
 
 CF_EXPORT int
-CF_Codec_Hex_Encode			(const unsigned char	* bin,
-							 const size_t			len,
-							 char					* hex);
+CF_Codec_Hex_Encode			(const cf_byte	* bin,
+							 const size_t	len,
+							 char			* hex);
 
 CF_EXPORT int
-CF_Codec_Hex_Decode			(const char		* hex,
-							 unsigned char	* bin,
-							 size_t			* len);
+CF_Codec_Hex_Decode			(const char	* hex,
+							 cf_byte	* bin,
+							 size_t		* len);
 
 CF_EXPORT int
-CF_Codec_Base64_Encode		(const unsigned char	* bin,
-							 const size_t			len,
-							 char					* base64);
+CF_Codec_Base64_Encode		(const cf_byte	* bin,
+							 const size_t	len,
+							 char			* base64);
 
 CF_EXPORT int
-CF_Codec_Base64_Decode		(const char		* base64,
-							 unsigned char	* bin,
-							 size_t			* len);
+CF_Codec_Base64_Decode		(const char	* base64,
+							 cf_byte	* bin,
+							 size_t		* len);
 
 #ifdef __cplusplus
Index: /trunk/include/cf_debug.h
===================================================================
--- /trunk/include/cf_debug.h	(revision 127)
+++ /trunk/include/cf_debug.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_debug.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_debug.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 디버그 유틸
@@ -17,4 +18,5 @@
 
 #include "cf_base.h"
+#include "cf_type.h"
 
 #include <stdio.h>
@@ -92,11 +94,11 @@
 
 CF_EXPORT int
-CF_Debug_PrintBin		(FILE					* fp,
-						 const char				* file,
-						 const char				* func,
-						 const int				line,
-						 const unsigned char	* bin,
-						 const size_t			len,
-						 const char				* fmt, ...);
+CF_Debug_PrintBin		(FILE			* fp,
+						 const char		* file,
+						 const char		* func,
+						 const int		line,
+						 const cf_byte	* bin,
+						 const size_t	len,
+						 const char		* fmt, ...);
 
 CF_EXPORT int
Index: /trunk/include/cf_error.h
===================================================================
--- /trunk/include/cf_error.h	(revision 127)
+++ /trunk/include/cf_error.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_error.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_error.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 오류코드 모음
@@ -14,5 +15,5 @@
 
 /* file {{{ */
-#define CF_ERROR_FILE						CF_ERROR_BASE * 2
+#define CF_ERROR_FILE						CF_ERROR_BASE * 1
 /*------------------------------------------------------------*/
 #define CF_ERROR_FILE_OPEN					CF_ERROR_FILE - 1
@@ -24,9 +25,8 @@
 #define CF_ERROR_FILE_GET_SIZE				CF_ERROR_FILE - 7
 #define CF_ERROR_FILE_MAKE_DIRECTORY		CF_ERROR_FILE - 8
-
 /* }}} file */
 
 /* socket {{{ */
-#define CF_ERROR_SOCKET						CF_ERROR_BASE * 3
+#define CF_ERROR_SOCKET						CF_ERROR_BASE * 2
 /*------------------------------------------------------------*/
 #define CF_ERROR_SOCKET_INITIALIZE			CF_ERROR_SOCKET - 1
@@ -51,5 +51,5 @@
 
 /* thread {{{ */
-#define CF_ERROR_THREAD						CF_ERROR_BASE * 4
+#define CF_ERROR_THREAD						CF_ERROR_BASE * 3
 /*------------------------------------------------------------*/
 #define CF_ERROR_THREAD_CREATE_CTX			CF_ERROR_THREAD - 1
@@ -64,5 +64,5 @@
 
 /* mutex {{{ */
-#define CF_ERROR_MUTEX						CF_ERROR_BASE * 5
+#define CF_ERROR_MUTEX						CF_ERROR_BASE * 4
 /*------------------------------------------------------------*/
 #define CF_ERROR_MUTEX_CREATE_CTX			CF_ERROR_MUTEX - 1
@@ -73,5 +73,5 @@
 
 /* debug {{{ */
-#define CF_ERROR_DEBUG						CF_ERROR_BASE * 6
+#define CF_ERROR_DEBUG						CF_ERROR_BASE * 5
 /*------------------------------------------------------------*/
 #define CF_ERROR_DEBUG_INVALID_CTX			CF_ERROR_DEBUG - 1
@@ -83,5 +83,5 @@
 
 /* log {{{ */
-#define CF_ERROR_LOG						CF_ERROR_BASE * 7
+#define CF_ERROR_LOG						CF_ERROR_BASE * 6
 /*------------------------------------------------------------*/
 #define CF_ERROR_LOG_INITIALIZE				CF_ERROR_LOG - 1
@@ -103,5 +103,5 @@
 
 /* codec {{{ */
-#define CF_ERROR_CODEC						CF_ERROR_BASE * 8
+#define CF_ERROR_CODEC						CF_ERROR_BASE * 7
 /*------------------------------------------------------------*/
 #define CF_ERROR_CODEC_INVALID_ARGS			CF_ERROR_CODEC - 1
@@ -111,5 +111,5 @@
 
 /* data structure - list/queue/stack {{{ */
-#define CF_ERROR_DS							CF_ERROR_BASE * 9
+#define CF_ERROR_DS							CF_ERROR_BASE * 8
 /*------------------------------------------------------------*/
 #define CF_ERROR_DS_INVALID_CTX				CF_ERROR_DS - 1
@@ -121,3 +121,10 @@
 /* }}} data structure - list/queue/stack */
 
+/* bitwise {{{ */
+#define CF_ERROR_BITWISE					CF_ERROR_BASE * 9
+/*------------------------------------------------------------*/
+#define CF_ERROR_BITWISE_INVALID_ARGS		CF_ERROR_BITWISE - 1
+#define CF_ERROR_BITWISE_ALLOCATE_BUFFER	CF_ERROR_BITWISE - 2
+/* }}} bitwise */
+
 #endif // #ifndef __CF_ERROR_H__
Index: /trunk/include/cf_file.h
===================================================================
--- /trunk/include/cf_file.h	(revision 127)
+++ /trunk/include/cf_file.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_file.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_file.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 파일 입출력
Index: /trunk/include/cf_list.h
===================================================================
--- /trunk/include/cf_list.h	(revision 127)
+++ /trunk/include/cf_list.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_list.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_list.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 연결 리스트
Index: /trunk/include/cf_log.h
===================================================================
--- /trunk/include/cf_log.h	(revision 127)
+++ /trunk/include/cf_log.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_log.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_log.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 로그
Index: /trunk/include/cf_mutex.h
===================================================================
--- /trunk/include/cf_mutex.h	(revision 127)
+++ /trunk/include/cf_mutex.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_mutex.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_mutex.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 뮤텍스 지원
Index: /trunk/include/cf_queue.h
===================================================================
--- /trunk/include/cf_queue.h	(revision 127)
+++ /trunk/include/cf_queue.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_queue.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_queue.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 큐
Index: /trunk/include/cf_socket.h
===================================================================
--- /trunk/include/cf_socket.h	(revision 127)
+++ /trunk/include/cf_socket.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_socket.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_socket.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief TCP 소켓 지원
Index: /trunk/include/cf_stack.h
===================================================================
--- /trunk/include/cf_stack.h	(revision 127)
+++ /trunk/include/cf_stack.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_stack.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_stack.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 스택
Index: /trunk/include/cf_thread.h
===================================================================
--- /trunk/include/cf_thread.h	(revision 127)
+++ /trunk/include/cf_thread.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_thread.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_thread.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 멀티스레드 지원
Index: /trunk/include/cf_type.h
===================================================================
--- /trunk/include/cf_type.h	(revision 128)
+++ /trunk/include/cf_type.h	(revision 128)
@@ -0,0 +1,15 @@
+/**
+ * \file cf_type.h
+ *
+ * \author myusgun <myusgun@gmail.com>
+ *
+ * \brief 자료형 정의
+ */
+#ifndef __CF_TYPE_H__
+#define __CF_TYPE_H__
+
+typedef		unsigned char		cf_byte;
+typedef		unsigned short		cf_word;
+typedef		unsigned int		cf_dword;
+
+#endif /// #ifndef __CF_TYPE_H__
Index: /trunk/src/cf_bitwise.c
===================================================================
--- /trunk/src/cf_bitwise.c	(revision 128)
+++ /trunk/src/cf_bitwise.c	(revision 128)
@@ -0,0 +1,271 @@
+/**
+ * \file cf_bitwise.c
+ *
+ * \author myusgun <myusgun@gmail.com>
+ * \author chevalier <achagun@gmail.com>
+ *
+ * \brief 비트 연산자 구현
+ */
+#include "cf_bitwise.h"
+#include "cf_error.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/**
+ * 비트열을 왼쪽으로 시프트
+ *
+ * \return 성공 시, CF_OK; 실패 시, 오류 코드
+ *
+ * \param in		시프트 할 비트열
+ * \param out		시프트 결과
+ * \param size		비트열 길이 (8의 배수)
+ * \param offset	시프트 할 수
+ */
+int
+CF_Bitwise_ShiftLeft (cf_byte	* in,
+					  cf_byte	* out,
+					  size_t	size,
+					  size_t	offset)
+{
+	size_t	iter = 0;
+
+	size_t	quota = offset / 8;
+	size_t	remain = offset % 8;
+	size_t	byteSize = size / 8;
+
+	size_t	maskPos = 8 - remain;
+	cf_byte	mask = 0;
+	cf_byte	buf = 0;
+
+	if (!in || !out)
+		return CF_ERROR_BITWISE_INVALID_ARGS;
+
+	for (iter = 0 ; iter < remain ; iter++)
+		mask |= (cf_byte)(0x80 >> iter);
+
+	out[0] = (cf_byte)(in[0 + quota] << remain);
+
+	for (iter = 1 ; iter < byteSize - quota ; iter++)
+	{
+		buf = in[iter + quota] & mask;
+
+		out[iter    ]  = (cf_byte)(in[iter + quota] << remain);
+		out[iter - 1] |= (cf_byte)(buf >> maskPos);
+	}
+
+	return CF_OK;
+}
+
+/**
+ * 비트열을 오른쪽으로 시프트
+ *
+ * \return 성공 시, CF_OK; 실패 시, 오류 코드
+ *
+ * \param in		시프트 할 비트열
+ * \param out		시프트 결과
+ * \param size		비트열 길이 (8의 배수)
+ * \param offset	시프트 할 수
+ */
+int
+CF_Bitwise_ShiftRight (cf_byte	* in,
+					   cf_byte	* out,
+					   size_t	size,
+					   size_t	offset)
+{
+	size_t	iter = 0;
+
+	size_t	quota = offset / 8;
+	size_t	remain = offset % 8;
+	size_t	byteSize = size / 8;
+
+	size_t	maskPos = 8 - remain;
+	cf_byte	mask = 0;
+	cf_byte	buf = 0;
+
+	if (!in || !out)
+		return CF_ERROR_BITWISE_INVALID_ARGS;
+
+	for (iter = 0 ; iter < remain ; iter++)
+		mask |= (cf_byte)(0x01 << iter);
+
+	out[byteSize - 1] = (cf_byte)(in[byteSize - 1 - quota] >> remain);
+
+	for (iter = byteSize - 2 ; iter > quota - 1 ; iter--)
+	{
+		buf = in[iter - quota] & mask;
+
+		out[iter    ]  = (cf_byte)(in[iter - quota] >> remain);
+		out[iter + 1] |= (cf_byte)(buf << maskPos);
+	}
+
+	return CF_OK;
+}
+
+/**
+ * 비트열을 왼쪽으로 로테이션
+ *
+ * \return 성공 시, CF_OK; 실패 시, 오류 코드
+ *
+ * \param in		로테이션 할 비트열
+ * \param out		로테이션 결과
+ * \param size		비트열 길이 (8의 배수)
+ * \param offset	로테이션 할 수
+ */
+int
+CF_Bitwise_RotateLeft (cf_byte	* in,
+					   cf_byte	* out,
+					   size_t	size,
+					   size_t	offset)
+{
+	int		result = 0;
+	cf_byte	* buf1 = NULL;
+	cf_byte	* buf2 = NULL;
+
+	if (!in || !out)
+		return CF_ERROR_BITWISE_INVALID_ARGS;
+
+	buf1 = (cf_byte *) calloc (size, 1);
+	buf2 = (cf_byte *) calloc (size, 1);
+
+	if (!buf1 || !buf2)
+		result = CF_ERROR_BITWISE_ALLOCATE_BUFFER;
+	else
+	{
+		CF_Bitwise_ShiftLeft (in, buf1, size, offset);
+		CF_Bitwise_ShiftRight (in, buf2, size, size - offset);
+
+		CF_Bitwise_OR (buf1, buf2, size, out);
+	}
+
+	if (buf1)	free (buf1);
+	if (buf2)	free (buf2);
+
+	return result;
+}
+
+/**
+ * 비트열을 오른쪽으로 로테이션
+ *
+ * \return 성공 시, CF_OK; 실패 시, 오류 코드
+ *
+ * \param in		로테이션 할 비트열
+ * \param out		로테이션 결과
+ * \param size		비트열 길이 (8의 배수)
+ * \param offset	로테이션 할 수
+ */
+int
+CF_Bitwise_RotateRight (cf_byte	* in,
+						cf_byte	* out,
+						size_t	size,
+						size_t	offset)
+{
+	int		result = 0;
+	cf_byte	* buf1 = NULL;
+	cf_byte	* buf2 = NULL;
+
+	if (!in || !out)
+		return CF_ERROR_BITWISE_INVALID_ARGS;
+
+	buf1 = (cf_byte *) calloc (size, 1);
+	buf2 = (cf_byte *) calloc (size, 1);
+
+	if (!buf1 || !buf2)
+		result = CF_ERROR_BITWISE_ALLOCATE_BUFFER;
+	else
+	{
+		CF_Bitwise_ShiftRight (in, buf1, size, offset);
+		CF_Bitwise_ShiftLeft (in, buf2, size, size - offset);
+
+		CF_Bitwise_OR (buf1, buf2, size, out);
+	}
+
+	if (buf1)	free (buf1);
+	if (buf2)	free (buf2);
+
+	return result;
+}
+
+/**
+ * 두 비트열의 AND
+ *
+ * \return 성공 시, CF_OK; 실패 시, 오류 코드
+ *
+ * \param in1	입력 비트열 1
+ * \param in2	입력 비트열 2
+ * \param size	비트열 길이 (8의 배수)
+ * \param out	두 비트열의 AND 결과
+ */
+int
+CF_Bitwise_AND (cf_byte	* in1,
+				cf_byte	* in2,
+				size_t	size,
+				cf_byte	* out)
+{
+	size_t	iter = 0;
+	size_t	quota = size / 8;
+
+	if (!in1 || !in2)
+		return CF_ERROR_BITWISE_INVALID_ARGS;
+
+	for (iter = 0 ; iter < quota ; iter++)
+		out[iter] = in1[iter] & in2[iter];
+
+	return 0;
+}
+
+/**
+ * 두 비트열의 OR
+ *
+ * \return 성공 시, CF_OK; 실패 시, 오류 코드
+ *
+ * \param in1	입력 비트열 1
+ * \param in2	입력 비트열 2
+ * \param size	비트열 길이 (8의 배수)
+ * \param out	두 비트열의 OR 결과
+ */
+int
+CF_Bitwise_OR (cf_byte	* in1,
+			   cf_byte	* in2,
+			   size_t	size,
+			   cf_byte	* out)
+{
+	size_t	iter = 0;
+	size_t	quota = size / 8;
+
+	if (!in1 || !in2)
+		return CF_ERROR_BITWISE_INVALID_ARGS;
+
+	for (iter = 0 ; iter < quota ; iter++)
+		out[iter] = in1[iter] | in2[iter];
+
+	return 0;
+}
+
+/**
+ * 두 비트열의 XOR
+ *
+ * \return 성공 시, CF_OK; 실패 시, 오류 코드
+ *
+ * \param in1	입력 비트열 1
+ * \param in2	입력 비트열 2
+ * \param size	비트열 길이 (8의 배수)
+ * \param out	두 비트열의 XOR 결과
+ */
+int
+CF_Bitwise_XOR (cf_byte	* in1,
+				cf_byte	* in2,
+				size_t	size,
+				cf_byte	* out)
+{
+	size_t	iter = 0;
+	size_t	quota = size / 8;
+
+	if (!in1 || !in2)
+		return CF_ERROR_BITWISE_INVALID_ARGS;
+
+	for (iter = 0 ; iter < quota ; iter++)
+		out[iter] = in1[iter] ^ in2[iter];
+
+	return 0;
+}
Index: /trunk/src/cf_codec.c
===================================================================
--- /trunk/src/cf_codec.c	(revision 127)
+++ /trunk/src/cf_codec.c	(revision 128)
@@ -1,9 +1,11 @@
 /**
- * \file	cf_codec.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_codec.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 데이터 변환 구현
  */
 #include "cf_codec.h"
+#include "cf_type.h"
 #include "cf_error.h"
 
@@ -15,5 +17,5 @@
 		return CF_ERROR_CODEC_INVALID_ARGS
 
-const static unsigned char g_ascii_HexDecode[] = {
+const static cf_byte g_ascii_HexDecode[] = {
 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,	/*  00 -  15 */
 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,	/*  16 -  31 */
@@ -48,5 +50,5 @@
 };
 
-const static unsigned char g_ascii_Base64Decode[] = {
+const static cf_byte g_ascii_Base64Decode[] = {
 	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,	/*  00 -  15 */
 	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,	/*  16 -  31 */
@@ -82,12 +84,12 @@
  */
 int
-CF_Codec_Hex_Encode (const unsigned char	* bin,
-					 const size_t			len,
-					 char					* hex)
+CF_Codec_Hex_Encode (const cf_byte	* bin,
+					 const size_t	len,
+					 char			* hex)
 {
 	size_t	iter = 0;
 	size_t	hexlen = len * 2 + 1;
 
-	const unsigned char	* ptr = bin;
+	const cf_byte	* ptr = bin;
 
 	const static char	hexchar[] = {'0', '1', '2', '3',
@@ -122,16 +124,16 @@
  */
 int
-CF_Codec_Hex_Decode (const char		* hex,
-					 unsigned char	* bin,
-					 size_t			* len)
+CF_Codec_Hex_Decode (const char	* hex,
+					 cf_byte	* bin,
+					 size_t		* len)
 {
-	size_t	length = 0;	/* absolutely even-number */
-	size_t	iter = 0;
-	size_t	binlen = 0;
-
-	const char		* ptr = hex;
-	char			buf = 0;
-	unsigned char	val = 0;
-	unsigned char	asciiHex = 0;
+	size_t		length = 0;	/* absolutely even-number */
+	size_t		iter = 0;
+	size_t		binlen = 0;
+
+	const char	* ptr = hex;
+	char		buf = 0;
+	cf_byte		val = 0;
+	cf_byte		asciiHex = 0;
 
 	ASSERT_ARGS (hex == NULL);
@@ -156,8 +158,8 @@
 		do {										\
 		buf = *(x);									\
-		val = (unsigned char)(val << 4);			\
+		val = (cf_byte)(val << 4);			\
 		asciiHex = g_ascii_HexDecode[(int)buf];		\
 													\
-		val |=	(unsigned char)						\
+		val |=	(cf_byte)						\
 				(buf - asciiHex + (asciiHex == '0' ? 0 : 10));	\
 		} while (0)
@@ -188,10 +190,10 @@
  */
 int
-CF_Codec_Base64_Encode (const unsigned char	* bin,
+CF_Codec_Base64_Encode (const cf_byte	* bin,
 						const size_t		len,
 						char				* base64)
 {
-	const unsigned char	* src = bin;
-	char				* dst = base64;
+	const cf_byte	* src = bin;
+	char			* dst = base64;
 
 	ASSERT_ARGS (src == NULL);
@@ -252,11 +254,11 @@
 int
 CF_Codec_Base64_Decode (const char		* base64,
-						unsigned char	* bin,
+						cf_byte	* bin,
 						size_t			* len)
 {
-	const char		* src = base64;
-	unsigned char	* dst = bin;
-	int				remain = 0;
-	int				binlen = 0;
+	const char	* src = base64;
+	cf_byte		* dst = bin;
+	int			remain = 0;
+	int			binlen = 0;
 
 	ASSERT_ARGS (src == NULL);
@@ -283,15 +285,15 @@
 	for (src = base64 ; remain > 4 ; remain -= 4, src += 4)
 	{
-		*dst++ = (unsigned char)(SEXTUPLE_D_1 (src) | SEXTUPLE_D_2 (src));
-		*dst++ = (unsigned char)(SEXTUPLE_D_3 (src) | SEXTUPLE_D_4 (src));
-		*dst++ = (unsigned char)(SEXTUPLE_D_5 (src) | SEXTUPLE_D_6 (src));
+		*dst++ = (cf_byte)(SEXTUPLE_D_1 (src) | SEXTUPLE_D_2 (src));
+		*dst++ = (cf_byte)(SEXTUPLE_D_3 (src) | SEXTUPLE_D_4 (src));
+		*dst++ = (cf_byte)(SEXTUPLE_D_5 (src) | SEXTUPLE_D_6 (src));
 	}
 
 	if (remain > 1)
-		*dst++ = (unsigned char)(SEXTUPLE_D_1 (src) | SEXTUPLE_D_2 (src));
+		*dst++ = (cf_byte)(SEXTUPLE_D_1 (src) | SEXTUPLE_D_2 (src));
 	if (remain > 2)
-		*dst++ = (unsigned char)(SEXTUPLE_D_3 (src) | SEXTUPLE_D_4 (src));
+		*dst++ = (cf_byte)(SEXTUPLE_D_3 (src) | SEXTUPLE_D_4 (src));
 	if (remain > 3)
-		*dst++ = (unsigned char)(SEXTUPLE_D_5 (src) | SEXTUPLE_D_6 (src));
+		*dst++ = (cf_byte)(SEXTUPLE_D_5 (src) | SEXTUPLE_D_6 (src));
 
 	return binlen - (4 - remain);
Index: /trunk/src/cf_debug.c
===================================================================
--- /trunk/src/cf_debug.c	(revision 127)
+++ /trunk/src/cf_debug.c	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_debug.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_debug.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 디버그 유틸 구현
@@ -75,10 +76,10 @@
 
 static int
-CF_Debug_Local_PrintBin (FILE					* fp,
-						 const char				* file,
-						 const char				* func,
-						 const int				line,
-						 const unsigned char	* bin,
-						 const size_t			len)
+CF_Debug_Local_PrintBin (FILE			* fp,
+						 const char		* file,
+						 const char		* func,
+						 const int		line,
+						 const cf_byte	* bin,
+						 const size_t	len)
 {
 	size_t i, j;
@@ -156,11 +157,11 @@
  */
 int
-CF_Debug_PrintBin (FILE					* fp,
-				   const char			* file,
-				   const char			* func,
-				   const int			line,
-				   const unsigned char	* bin,
-				   const size_t			len,
-				   const char			* fmt, ...)
+CF_Debug_PrintBin (FILE				* fp,
+				   const char		* file,
+				   const char		* func,
+				   const int		line,
+				   const cf_byte	* bin,
+				   const size_t		len,
+				   const char		* fmt, ...)
 {
 	va_list valist;
Index: /trunk/src/cf_file.c
===================================================================
--- /trunk/src/cf_file.c	(revision 127)
+++ /trunk/src/cf_file.c	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_file.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_file.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 파일 입출력 구현
Index: /trunk/src/cf_list.c
===================================================================
--- /trunk/src/cf_list.c	(revision 127)
+++ /trunk/src/cf_list.c	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_list.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_list.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 연결 리스트 구현
Index: /trunk/src/cf_local.h
===================================================================
--- /trunk/src/cf_local.h	(revision 127)
+++ /trunk/src/cf_local.h	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_local.h
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_local.h
+ *
+ * \author myusgun <myusgun@gmail.com>
  */
 #ifndef __CF_LOCAL_H__
Index: /trunk/src/cf_log.c
===================================================================
--- /trunk/src/cf_log.c	(revision 127)
+++ /trunk/src/cf_log.c	(revision 128)
@@ -1,6 +1,7 @@
 /**
- * \file	cf_log.c
- * \author	myusgun <myusgun@gmail.com>
- * \author	vfire
+ * \file cf_log.c
+ *
+ * \author myusgun <myusgun@gmail.com>
+ * \author vfire
  *
  * \brief 로그 구현
Index: /trunk/src/cf_mutex.c
===================================================================
--- /trunk/src/cf_mutex.c	(revision 127)
+++ /trunk/src/cf_mutex.c	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_mutex.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_mutex.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 뮤텍스 구현
Index: /trunk/src/cf_queue.c
===================================================================
--- /trunk/src/cf_queue.c	(revision 127)
+++ /trunk/src/cf_queue.c	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_queue.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_queue.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 큐 구현
Index: /trunk/src/cf_socket.c
===================================================================
--- /trunk/src/cf_socket.c	(revision 127)
+++ /trunk/src/cf_socket.c	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_socket.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_socket.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief TCP 소켓 구현
Index: /trunk/src/cf_stack.c
===================================================================
--- /trunk/src/cf_stack.c	(revision 127)
+++ /trunk/src/cf_stack.c	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_stack.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_stack.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 스택 구현
Index: /trunk/src/cf_thread.c
===================================================================
--- /trunk/src/cf_thread.c	(revision 127)
+++ /trunk/src/cf_thread.c	(revision 128)
@@ -1,5 +1,6 @@
 /**
- * \file	cf_thread.c
- * \author	myusgun <myusgun@gmail.com>
+ * \file cf_thread.c
+ *
+ * \author myusgun <myusgun@gmail.com>
  *
  * \brief 멀티 스레드 구현
Index: /trunk/src/makefile
===================================================================
--- /trunk/src/makefile	(revision 127)
+++ /trunk/src/makefile	(revision 128)
@@ -19,4 +19,5 @@
 					cf_queue		\
 					cf_stack		\
+					cf_bitwise		\
 
 TARGET_NAME		= cf
