Lines Matching refs:inst
205 struct crypto_instance *inst = (void *)tfm->__crt_alg; in crypto_pcbc_init_tfm() local
206 struct crypto_spawn *spawn = crypto_instance_ctx(inst); in crypto_pcbc_init_tfm()
226 struct crypto_instance *inst; in crypto_pcbc_alloc() local
239 inst = crypto_alloc_instance("pcbc", alg); in crypto_pcbc_alloc()
240 if (IS_ERR(inst)) in crypto_pcbc_alloc()
243 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in crypto_pcbc_alloc()
244 inst->alg.cra_priority = alg->cra_priority; in crypto_pcbc_alloc()
245 inst->alg.cra_blocksize = alg->cra_blocksize; in crypto_pcbc_alloc()
246 inst->alg.cra_alignmask = alg->cra_alignmask; in crypto_pcbc_alloc()
247 inst->alg.cra_type = &crypto_blkcipher_type; in crypto_pcbc_alloc()
250 inst->alg.cra_alignmask |= __alignof__(u32) - 1; in crypto_pcbc_alloc()
252 inst->alg.cra_blkcipher.ivsize = alg->cra_blocksize; in crypto_pcbc_alloc()
253 inst->alg.cra_blkcipher.min_keysize = alg->cra_cipher.cia_min_keysize; in crypto_pcbc_alloc()
254 inst->alg.cra_blkcipher.max_keysize = alg->cra_cipher.cia_max_keysize; in crypto_pcbc_alloc()
256 inst->alg.cra_ctxsize = sizeof(struct crypto_pcbc_ctx); in crypto_pcbc_alloc()
258 inst->alg.cra_init = crypto_pcbc_init_tfm; in crypto_pcbc_alloc()
259 inst->alg.cra_exit = crypto_pcbc_exit_tfm; in crypto_pcbc_alloc()
261 inst->alg.cra_blkcipher.setkey = crypto_pcbc_setkey; in crypto_pcbc_alloc()
262 inst->alg.cra_blkcipher.encrypt = crypto_pcbc_encrypt; in crypto_pcbc_alloc()
263 inst->alg.cra_blkcipher.decrypt = crypto_pcbc_decrypt; in crypto_pcbc_alloc()
267 return inst; in crypto_pcbc_alloc()
270 static void crypto_pcbc_free(struct crypto_instance *inst) in crypto_pcbc_free() argument
272 crypto_drop_spawn(crypto_instance_ctx(inst)); in crypto_pcbc_free()
273 kfree(inst); in crypto_pcbc_free()