Lines Matching refs:inst
99 struct crypto_instance *inst = (void *)tfm->__crt_alg; in crypto_ecb_init_tfm() local
100 struct crypto_spawn *spawn = crypto_instance_ctx(inst); in crypto_ecb_init_tfm()
120 struct crypto_instance *inst; in crypto_ecb_alloc() local
133 inst = crypto_alloc_instance("ecb", alg); in crypto_ecb_alloc()
134 if (IS_ERR(inst)) in crypto_ecb_alloc()
137 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in crypto_ecb_alloc()
138 inst->alg.cra_priority = alg->cra_priority; in crypto_ecb_alloc()
139 inst->alg.cra_blocksize = alg->cra_blocksize; in crypto_ecb_alloc()
140 inst->alg.cra_alignmask = alg->cra_alignmask; in crypto_ecb_alloc()
141 inst->alg.cra_type = &crypto_blkcipher_type; in crypto_ecb_alloc()
143 inst->alg.cra_blkcipher.min_keysize = alg->cra_cipher.cia_min_keysize; in crypto_ecb_alloc()
144 inst->alg.cra_blkcipher.max_keysize = alg->cra_cipher.cia_max_keysize; in crypto_ecb_alloc()
146 inst->alg.cra_ctxsize = sizeof(struct crypto_ecb_ctx); in crypto_ecb_alloc()
148 inst->alg.cra_init = crypto_ecb_init_tfm; in crypto_ecb_alloc()
149 inst->alg.cra_exit = crypto_ecb_exit_tfm; in crypto_ecb_alloc()
151 inst->alg.cra_blkcipher.setkey = crypto_ecb_setkey; in crypto_ecb_alloc()
152 inst->alg.cra_blkcipher.encrypt = crypto_ecb_encrypt; in crypto_ecb_alloc()
153 inst->alg.cra_blkcipher.decrypt = crypto_ecb_decrypt; in crypto_ecb_alloc()
157 return inst; in crypto_ecb_alloc()
160 static void crypto_ecb_free(struct crypto_instance *inst) in crypto_ecb_free() argument
162 crypto_drop_spawn(crypto_instance_ctx(inst)); in crypto_ecb_free()
163 kfree(inst); in crypto_ecb_free()