Lines Matching +full:0 +full:x07
23 zassert_equal(crc32_c(0, test1, sizeof(test1), true, true), in ZTEST()
24 0xE16DCDEE, NULL); in ZTEST()
25 zassert_equal(crc32_c(0, test2, sizeof(test2), true, true), in ZTEST()
26 0xE3069283, NULL); in ZTEST()
27 zassert_equal(crc32_c(0, test3, sizeof(test3), true, true), in ZTEST()
28 0xFCDEB58D, NULL); in ZTEST()
35 zassert_equal(crc32_c(0, test1, sizeof(test1), true, false), in ZTEST()
36 0x1E923211, NULL); in ZTEST()
37 zassert_equal(crc32_c(0x1E923211, test2, sizeof(test2), false, false), in ZTEST()
38 0xB2983B83, NULL); in ZTEST()
39 zassert_equal(crc32_c(0xB2983B83, test3, sizeof(test3), false, true), in ZTEST()
40 0x7D4F9D21, NULL); in ZTEST()
49 zassert_equal(crc32_ieee(test1, sizeof(test1)), 0xD3D99E8B); in ZTEST()
50 zassert_equal(crc32_ieee(test2, sizeof(test2)), 0xCBF43926); in ZTEST()
51 zassert_equal(crc32_ieee(test3, sizeof(test3)), 0x20089AA4); in ZTEST()
60 zassert_equal(crc24_pgp(test1, sizeof(test1)), 0x00FE86FA); in ZTEST()
61 zassert_equal(crc24_pgp(test2, sizeof(test2)), 0x0021CF02); in ZTEST()
62 zassert_equal(crc24_pgp(test3, sizeof(test3)), 0x004662E9); in ZTEST()
65 zassert_equal(crc24_pgp_update(CRC24_PGP_INITIAL_VALUE, test2, 3), 0x0009DF67); in ZTEST()
66 zassert_equal(crc24_pgp_update(0x0009DF67, test2 + 3, 2), 0x00BA353A); in ZTEST()
67 zassert_equal(crc24_pgp_update(0x00BA353A, test2 + 5, 4), 0x0021CF02); in ZTEST()
76 * check=0x2189 in ZTEST()
77 * poly is 0x1021, reflected 0x8408 in ZTEST()
79 zassert_equal(crc16_reflect(0x8408, 0x0, test, sizeof(test)), 0x2189); in ZTEST()
83 * check=0x007f in ZTEST()
85 zassert_equal(crc16(0x0589, 0x0, test, sizeof(test)), 0x007f); in ZTEST()
96 * check=0x4b37 in ZTEST()
97 * poly is 0x1021, reflected 0xA001 in ZTEST()
99 zassert_equal(crc16_c, 0x4b37); in ZTEST()
100 zassert_equal(crc16_reflect(0xA001, 0xffff, test, sizeof(test)), crc16_c); in ZTEST()
108 uint8_t test3[] = { 'Z', 'e', 'p', 'h', 'y', 'r', 0, 0 }; in ZTEST()
111 zassert_equal(crc16_ccitt(0, test0, sizeof(test0)), 0x0); in ZTEST()
112 zassert_equal(crc16_ccitt(0, test1, sizeof(test1)), 0x538d); in ZTEST()
115 * check=0x2189 in ZTEST()
117 zassert_equal(crc16_ccitt(0, test2, sizeof(test2)), 0x2189); in ZTEST()
120 * check=0x906e in ZTEST()
122 zassert_equal(crc16_ccitt(0xffff, test2, sizeof(test2)) ^ 0xffff, in ZTEST()
123 0x906e, NULL); in ZTEST()
128 crc = crc16_ccitt(0, test3, sizeof(test3) - sizeof(uint16_t)); in ZTEST()
129 test3[sizeof(test3)-2] = (uint8_t)(crc >> 0); in ZTEST()
132 zassert_equal(crc16_ccitt(0, test3, sizeof(test3)), 0); in ZTEST()
141 0xff, 0x03, 0xc0, 0x21, 0x01, 0x01, 0x00, 0x17, in ZTEST()
142 0x02, 0x06, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x06, in ZTEST()
143 0x00, 0x2a, 0x2b, 0x78, 0x07, 0x02, 0x08, 0x02, in ZTEST()
144 0x0d, 0x03, 0x06, 0xa5, 0xf8 in ZTEST()
148 zassert_equal(crc16_ccitt(0xffff, test0, sizeof(test0)), in ZTEST()
149 0xf0b8, NULL); in ZTEST()
150 zassert_equal(crc16_ccitt(0xffff, test2, sizeof(test2)) ^ 0xFFFF, in ZTEST()
151 0x906e, NULL); in ZTEST()
160 * check=0x31c3 in ZTEST()
162 zassert_equal(crc16_itu_t(0, test2, sizeof(test2)), 0x31c3); in ZTEST()
165 * check=0x29b1 in ZTEST()
167 zassert_equal(crc16_itu_t(0xffff, test2, sizeof(test2)), 0x29b1); in ZTEST()
170 * check=0xce3c in ZTEST()
172 zassert_equal(crc16_itu_t(0, test2, sizeof(test2)) ^ 0xffff, 0xce3c); in ZTEST()
178 uint8_t test0[] = { 0 }; in ZTEST()
182 zassert_equal(crc8_ccitt(CRC8_CCITT_INITIAL_VALUE, test0, sizeof(test0)), 0xF3); in ZTEST()
183 zassert_equal(crc8_ccitt(CRC8_CCITT_INITIAL_VALUE, test1, sizeof(test1)), 0x33); in ZTEST()
184 zassert_equal(crc8_ccitt(CRC8_CCITT_INITIAL_VALUE, test2, sizeof(test2)), 0xFB); in ZTEST()
189 uint8_t test0[] = { 0 }; in ZTEST()
192 uint8_t test3[] = { 0x07, 0x3F }; /* GSM 07.10 example */ in ZTEST()
193 uint8_t test4[] = { 0x07, 0x3F, 0x89 }; /* GSM 07.10 example */ in ZTEST()
194 uint8_t test5[] = { 0x03, 0x3f, 0x01, 0x1c }; /* Our GSM 07.10 calc */ in ZTEST()
196 zassert_equal(crc8_rohc(CRC8_ROHC_INITIAL_VALUE, test0, sizeof(test0)), 0xcf); in ZTEST()
197 zassert_equal(crc8_rohc(CRC8_ROHC_INITIAL_VALUE, test1, sizeof(test1)), 0x2e); in ZTEST()
198 zassert_equal(crc8_rohc(CRC8_ROHC_INITIAL_VALUE, test2, sizeof(test2)), 0xd0); in ZTEST()
199 zassert_equal(crc8_rohc(CRC8_ROHC_INITIAL_VALUE, test3, sizeof(test3)), 0x76); in ZTEST()
200 zassert_equal(crc8_rohc(CRC8_ROHC_INITIAL_VALUE, test4, sizeof(test4)), 0xcf); in ZTEST()
201 zassert_equal(crc8_rohc(CRC8_ROHC_INITIAL_VALUE, test5, sizeof(test5)), 0xcf); in ZTEST()
206 uint8_t test0[] = { 0 }; in ZTEST()
210 zassert_equal(crc7_be(0, test0, sizeof(test0)), 0); in ZTEST()
211 zassert_equal(crc7_be(0, test1, sizeof(test1)), 0xDA); in ZTEST()
212 zassert_equal(crc7_be(0, test2, sizeof(test2)), 0xEA); in ZTEST()
219 uint8_t test0[] = { 0x00 }; in ZTEST()
220 uint8_t test1[] = { 0xBE, 0xEF }; in ZTEST()
221 uint8_t test2[] = { 0x07, 0x3F }; /* GSM 07.10 example */ in ZTEST()
222 uint8_t test3[] = { 0x07, 0x3F, 0x89 }; /* GSM 07.10 example */ in ZTEST()
223 uint8_t test4[] = { 0x03, 0x02, 0x0A, 0x38, 0x17, 0x00 }; in ZTEST()
224 uint8_t test5[] = { 0x03, 0x3f, 0x01, 0x1c }; /* Our GSM 07.10 calc */ in ZTEST()
226 fcs = crc8(test0, sizeof(test0), 0x00, 0x00, false); in ZTEST()
227 expected = 0x00; in ZTEST()
228 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
230 fcs = crc8(test0, sizeof(test0), 0x31, 0x00, false); in ZTEST()
231 expected = 0x00; in ZTEST()
232 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
234 fcs = crc8(test1, sizeof(test1), 0x07, 0x00, false); in ZTEST()
235 expected = 0x1a; in ZTEST()
236 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
238 fcs = crc8(test1, sizeof(test1), 0x31, 0xff, false); in ZTEST()
239 expected = 0x92; in ZTEST()
240 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
242 fcs = crc8(test1, sizeof(test1), 0x07, 0x00, false); in ZTEST()
243 expected = 0x1a; in ZTEST()
244 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
246 fcs = crc8(test2, sizeof(test2), 0x31, 0x00, false); in ZTEST()
247 expected = 0x45; in ZTEST()
248 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
250 fcs = crc8(test2, sizeof(test2), 0x31, 0xff, false); in ZTEST()
251 expected = 0xc4; in ZTEST()
252 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
254 fcs = crc8(test2, sizeof(test2), 0x07, 0x00, false); in ZTEST()
255 expected = 0xd6; in ZTEST()
256 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
258 fcs = crc8(test2, sizeof(test2), 0x07, 0xff, false); in ZTEST()
259 expected = 0x01; in ZTEST()
260 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
262 fcs = crc8(test2, sizeof(test2), 0xe0, 0xff, true); in ZTEST()
263 expected = 0x76; in ZTEST()
264 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
266 fcs = crc8(test3, sizeof(test3), 0xe0, 0xff, true); in ZTEST()
267 expected = 0xcf; in ZTEST()
268 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
270 fcs = crc8(test3, sizeof(test3), 0x07, 0xff, false); in ZTEST()
271 expected = 0xb1; in ZTEST()
272 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
274 fcs = crc8(test4, sizeof(test4), 0x31, 0x00, false); in ZTEST()
275 expected = 0x3a; in ZTEST()
276 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
278 fcs = crc8(test4, sizeof(test4), 0x07, 0x00, false); in ZTEST()
279 expected = 0xaf; in ZTEST()
280 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
282 fcs = crc8(test4, sizeof(test4), 0x9b, 0xff, false); in ZTEST()
283 expected = 0xf0; in ZTEST()
284 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
286 fcs = crc8(test4, sizeof(test4), 0x1d, 0xfd, false); in ZTEST()
287 expected = 0x49; in ZTEST()
288 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
290 fcs = crc8(test5, sizeof(test5), 0xe0, 0xff, true); in ZTEST()
291 expected = 0xcf; in ZTEST()
292 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()