Changeset 129 in libcf for trunk/src/cf_bitwise.c
- Timestamp:
- 06/22/13 12:08:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_bitwise.c
r128 r129 19 19 * 20 20 * \param in 시프트 할 비트열 21 * \param size 비트열 길이 (8의 배수) 22 * \param offset 시프트 할 수 21 23 * \param out 시프트 결과 22 * \param size 비트열 길이 (8의 배수)23 * \param offset 시프트 할 수24 24 */ 25 25 int 26 26 CF_Bitwise_ShiftLeft (cf_byte * in, 27 cf_byte * out,28 27 size_t size, 29 size_t offset) 28 size_t offset, 29 cf_byte * out) 30 30 { 31 31 size_t iter = 0; … … 64 64 * 65 65 * \param in 시프트 할 비트열 66 * \param size 비트열 길이 (8의 배수) 67 * \param offset 시프트 할 수 66 68 * \param out 시프트 결과 67 * \param size 비트열 길이 (8의 배수)68 * \param offset 시프트 할 수69 69 */ 70 70 int 71 71 CF_Bitwise_ShiftRight (cf_byte * in, 72 cf_byte * out,73 72 size_t size, 74 size_t offset) 73 size_t offset, 74 cf_byte * out) 75 75 { 76 76 size_t iter = 0; … … 109 109 * 110 110 * \param in 로테이션 할 비트열 111 * \param size 비트열 길이 (8의 배수) 112 * \param offset 로테이션 할 수 111 113 * \param out 로테이션 결과 112 * \param size 비트열 길이 (8의 배수)113 * \param offset 로테이션 할 수114 114 */ 115 115 int 116 116 CF_Bitwise_RotateLeft (cf_byte * in, 117 cf_byte * out,118 117 size_t size, 119 size_t offset) 118 size_t offset, 119 cf_byte * out) 120 120 { 121 121 int result = 0; … … 133 133 else 134 134 { 135 CF_Bitwise_ShiftLeft (in, buf1, size, offset);136 CF_Bitwise_ShiftRight (in, buf2, size, size - offset);135 CF_Bitwise_ShiftLeft (in, size, offset, buf1); 136 CF_Bitwise_ShiftRight (in, size, size - offset, buf2); 137 137 138 138 CF_Bitwise_OR (buf1, buf2, size, out); … … 151 151 * 152 152 * \param in 로테이션 할 비트열 153 * \param size 비트열 길이 (8의 배수) 154 * \param offset 로테이션 할 수 153 155 * \param out 로테이션 결과 154 * \param size 비트열 길이 (8의 배수)155 * \param offset 로테이션 할 수156 156 */ 157 157 int 158 158 CF_Bitwise_RotateRight (cf_byte * in, 159 cf_byte * out,160 159 size_t size, 161 size_t offset) 160 size_t offset, 161 cf_byte * out) 162 162 { 163 163 int result = 0; … … 175 175 else 176 176 { 177 CF_Bitwise_ShiftRight (in, buf1, size, offset);178 CF_Bitwise_ShiftLeft (in, buf2, size, size - offset);177 CF_Bitwise_ShiftRight (in, size, offset, buf1); 178 CF_Bitwise_ShiftLeft (in, size, size - offset, buf2); 179 179 180 180 CF_Bitwise_OR (buf1, buf2, size, out);
Note:
See TracChangeset
for help on using the changeset viewer.