Lines Matching refs:inst
204 struct crypto_instance *inst = (void *)tfm->__crt_alg; in cmac_init_tfm() local
205 struct crypto_cipher_spawn *spawn = crypto_instance_ctx(inst); in cmac_init_tfm()
225 struct shash_instance *inst; in cmac_create() local
236 inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL); in cmac_create()
237 if (!inst) in cmac_create()
239 spawn = shash_instance_ctx(inst); in cmac_create()
241 err = crypto_grab_cipher(spawn, shash_crypto_instance(inst), in cmac_create()
256 err = crypto_inst_setname(shash_crypto_instance(inst), tmpl->name, alg); in cmac_create()
261 inst->alg.base.cra_alignmask = alignmask; in cmac_create()
262 inst->alg.base.cra_priority = alg->cra_priority; in cmac_create()
263 inst->alg.base.cra_blocksize = alg->cra_blocksize; in cmac_create()
265 inst->alg.digestsize = alg->cra_blocksize; in cmac_create()
266 inst->alg.descsize = in cmac_create()
271 inst->alg.base.cra_ctxsize = in cmac_create()
277 inst->alg.base.cra_init = cmac_init_tfm; in cmac_create()
278 inst->alg.base.cra_exit = cmac_exit_tfm; in cmac_create()
280 inst->alg.init = crypto_cmac_digest_init; in cmac_create()
281 inst->alg.update = crypto_cmac_digest_update; in cmac_create()
282 inst->alg.final = crypto_cmac_digest_final; in cmac_create()
283 inst->alg.setkey = crypto_cmac_digest_setkey; in cmac_create()
285 inst->free = shash_free_singlespawn_instance; in cmac_create()
287 err = shash_register_instance(tmpl, inst); in cmac_create()
290 shash_free_singlespawn_instance(inst); in cmac_create()