Lines Matching refs:ksize
816 static int prepare_keybuf(const u8 *key, unsigned int ksize, in prepare_keybuf() argument
827 keybuf = kmalloc(key_offset + ksize, GFP_KERNEL); in prepare_keybuf()
831 memcpy(keyptr, key, ksize); in prepare_keybuf()
839 #define do_setkey(setkey_f, tfm, key, ksize, cfg, alignmask) \ argument
844 err = prepare_keybuf((key), (ksize), (cfg), (alignmask), \
847 err = setkey_f((tfm), keyptr, (ksize)); \
1237 if (vec->ksize) { in test_shash_vec_cfg()
1238 err = do_setkey(crypto_shash_setkey, tfm, vec->key, vec->ksize, in test_shash_vec_cfg()
1425 if (vec->ksize) { in test_ahash_vec_cfg()
1426 err = do_setkey(crypto_ahash_setkey, tfm, vec->key, vec->ksize, in test_ahash_vec_cfg()
1652 vec->ksize = 0; in generate_random_hash_testvec()
1654 vec->ksize = maxkeysize; in generate_random_hash_testvec()
1656 vec->ksize = 1 + prandom_u32_max(maxkeysize); in generate_random_hash_testvec()
1657 generate_random_bytes((u8 *)vec->key, vec->ksize); in generate_random_hash_testvec()
1660 vec->ksize); in generate_random_hash_testvec()
1671 vec->psize, vec->ksize); in generate_random_hash_testvec()
1943 if (template[nr_unkeyed].ksize) in alg_test_hash()
1947 if (!template[nr_unkeyed + nr_keyed].ksize) { in alg_test_hash()
1953 template[nr_unkeyed + nr_keyed].ksize); in alg_test_hash()