Lines Matching refs:test_buf

14 static u8 *test_buf;  variable
87 test_buf = orig_test_buf + alloc_len - TEST_BUF_LEN; in hash_suite_init()
95 test_buf = NULL; in hash_suite_exit()
112 rand_bytes_seeded_from_len(test_buf, data_len); in test_hash_test_vectors()
114 HASH(test_buf, data_len, actual_hash); in test_hash_test_vectors()
134 rand_bytes_seeded_from_len(test_buf, 4096); in test_hash_all_lens_up_to_4096()
137 HASH(test_buf, len, hash); in test_hash_all_lens_up_to_4096()
160 rand_bytes(&test_buf[offset], total_len); in test_hash_incremental_updates()
163 HASH(&test_buf[offset], total_len, hash1); in test_hash_incremental_updates()
175 HASH_UPDATE(&ctx, &test_buf[cur_offset], part_len); in test_hash_incremental_updates()
181 HASH_UPDATE(&ctx, &test_buf[cur_offset], remaining_len); in test_hash_incremental_updates()
201 void *const buf_end = &test_buf[TEST_BUF_LEN]; in test_hash_buffer_overruns()
204 rand_bytes(test_buf, TEST_BUF_LEN); in test_hash_buffer_overruns()
218 HASH(test_buf, len, buf_end - HASH_SIZE); in test_hash_buffer_overruns()
220 HASH_UPDATE(&ctx, test_buf, len); in test_hash_buffer_overruns()
225 HASH_UPDATE(guarded_ctx, test_buf, len); in test_hash_buffer_overruns()
240 rand_bytes(test_buf, TEST_BUF_LEN); in test_hash_overlaps()
246 u8 *ovl_hash = left_end ? &test_buf[offset] : in test_hash_overlaps()
247 &test_buf[offset + len - HASH_SIZE]; in test_hash_overlaps()
249 HASH(&test_buf[offset], len, hash); in test_hash_overlaps()
250 HASH(&test_buf[offset], len, ovl_hash); in test_hash_overlaps()
257 HASH(&test_buf[offset], len, hash); in test_hash_overlaps()
259 HASH_UPDATE(&ctx, &test_buf[offset], len); in test_hash_overlaps()
267 HASH(&test_buf[offset], len, hash); in test_hash_overlaps()
269 HASH_UPDATE(&ctx, &test_buf[offset], len); in test_hash_overlaps()
270 rand_bytes(&test_buf[offset], len); in test_hash_overlaps()
295 rand_bytes(&test_buf[data_offs1], len); in test_hash_alignment_consistency()
296 HASH(&test_buf[data_offs1], len, &hash1[hash_offs1]); in test_hash_alignment_consistency()
297 memmove(&test_buf[data_offs2], &test_buf[data_offs1], len); in test_hash_alignment_consistency()
298 HASH(&test_buf[data_offs2], len, &hash2[hash_offs2]); in test_hash_alignment_consistency()
312 rand_bytes(test_buf, 128); in test_hash_ctx_zeroization()
314 HASH_UPDATE(&ctx, test_buf, 128); in test_hash_ctx_zeroization()
315 HASH_FINAL(&ctx, test_buf); in test_hash_ctx_zeroization()
339 HASH(&test_buf[i * IRQ_TEST_DATA_LEN], IRQ_TEST_DATA_LEN, actual_hash); in hash_irq_test1_func()
352 rand_bytes(test_buf, IRQ_TEST_NUM_BUFFERS * IRQ_TEST_DATA_LEN); in test_hash_interrupt_context_1()
354 HASH(&test_buf[i * IRQ_TEST_DATA_LEN], IRQ_TEST_DATA_LEN, in test_hash_interrupt_context_1()
400 HASH_UPDATE(&ctx->hash_ctx, &test_buf[ctx->offset], in hash_irq_test2_func()
435 rand_bytes(test_buf, TEST_BUF_LEN); in test_hash_interrupt_context_2()
436 HASH(test_buf, TEST_BUF_LEN, state->expected_hash); in test_hash_interrupt_context_2()
496 rand_bytes_seeded_from_len(test_buf, 4096); in test_hmac()
497 raw_key = &test_buf[4096]; in test_hmac()
512 HMAC_UPDATE(&ctx, test_buf, data_len); in test_hmac()
515 HMAC_USINGRAWKEY(raw_key, key_len, test_buf, data_len, mac); in test_hmac()
520 HMAC(&key, test_buf, data_len, mac2); in test_hmac()
550 HASH(test_buf, TEST_BUF_LEN, hash); in benchmark_hash()
562 HASH(test_buf, len, hash); in benchmark_hash()