Lines Matching refs:template

1998 	const struct hash_testvec *template = desc->suite.hash.vecs;  in alg_test_hash()  local
2011 if (template[nr_unkeyed].ksize) in alg_test_hash()
2015 if (!template[nr_unkeyed + nr_keyed].ksize) { in alg_test_hash()
2021 template[nr_unkeyed + nr_keyed].ksize); in alg_test_hash()
2026 err = __alg_test_hash(template, nr_unkeyed, driver, type, mask, in alg_test_hash()
2028 template += nr_unkeyed; in alg_test_hash()
2032 err = __alg_test_hash(template, nr_keyed, driver, type, mask, in alg_test_hash()
2720 const struct cipher_testvec *template, in test_cipher() argument
2743 if (fips_enabled && template[i].fips_skip) in test_cipher()
2746 input = enc ? template[i].ptext : template[i].ctext; in test_cipher()
2747 result = enc ? template[i].ctext : template[i].ptext; in test_cipher()
2751 if (WARN_ON(template[i].len > PAGE_SIZE)) in test_cipher()
2755 memcpy(data, input, template[i].len); in test_cipher()
2758 if (template[i].wk) in test_cipher()
2761 ret = crypto_cipher_setkey(tfm, template[i].key, in test_cipher()
2762 template[i].klen); in test_cipher()
2764 if (ret == template[i].setkey_error) in test_cipher()
2767 algo, j, template[i].setkey_error, ret, in test_cipher()
2771 if (template[i].setkey_error) { in test_cipher()
2773 algo, j, template[i].setkey_error); in test_cipher()
2778 for (k = 0; k < template[i].len; in test_cipher()
2789 if (memcmp(q, result, template[i].len)) { in test_cipher()
2792 hexdump(q, template[i].len); in test_cipher()
3446 const struct cprng_testvec *template, in test_cprng() argument
3466 memcpy(seed, template[i].v, template[i].vlen); in test_cprng()
3467 memcpy(seed + template[i].vlen, template[i].key, in test_cprng()
3468 template[i].klen); in test_cprng()
3469 memcpy(seed + template[i].vlen + template[i].klen, in test_cprng()
3470 template[i].dt, template[i].dtlen); in test_cprng()
3479 for (j = 0; j < template[i].loops; j++) { in test_cprng()
3481 template[i].rlen); in test_cprng()
3486 template[i].rlen); in test_cprng()
3491 err = memcmp(result, template[i].result, in test_cprng()
3492 template[i].rlen); in test_cprng()
3496 hexdump(result, template[i].rlen); in test_cprng()
3652 const struct drbg_testvec *template = desc->suite.drbg.vecs; in alg_test_drbg() local
3659 err = drbg_cavs_test(&template[i], pr, driver, type, mask); in alg_test_drbg()