eapol/eapol_framework/eapol_common/am/common/bloom_algorithm/eap_am_bloom_algorithm.cpp
equal
deleted
inserted
replaced
14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: % |
19 * %version: 9 % |
20 */ |
20 */ |
21 |
21 |
22 // This is enumeration of EAPOL source code. |
22 // This is enumeration of EAPOL source code. |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
24 #undef EAP_FILE_NUMBER_ENUM |
24 #undef EAP_FILE_NUMBER_ENUM |
151 const u8_t mask = static_cast<u8_t>(pre_mask >> (-shift)); |
151 const u8_t mask = static_cast<u8_t>(pre_mask >> (-shift)); |
152 bit_index |= (input_data[data_ind] & mask) << (-shift); |
152 bit_index |= (input_data[data_ind] & mask) << (-shift); |
153 } |
153 } |
154 else |
154 else |
155 { |
155 { |
156 const u8_t mask = static_cast<const u8_t>(0xff << shift); |
156 const u8_t mask = 0xff << shift; |
157 bit_index |= (input_data[data_ind] & mask) >> (shift); |
157 bit_index |= (input_data[data_ind] & mask) >> (shift); |
158 } |
158 } |
159 } |
159 } |
160 |
160 |
161 return bit_index; |
161 return bit_index; |