Lines Matching full:alg
104 static struct sdesc *init_sdesc(struct crypto_shash *alg)
109 size = sizeof(struct shash_desc) + crypto_shash_descsize(alg);
113 sdesc->shash.tfm = alg;
117 static int calc_hash(struct crypto_shash *alg,
124 sdesc = init_sdesc(alg);
138 struct crypto_shash *alg;
142 alg = crypto_alloc_shash(hash_alg_name, 0, 0);
143 if (IS_ERR(alg)) {
144 pr_info("can't alloc alg %s\n", hash_alg_name);
145 return PTR_ERR(alg);
147 ret = calc_hash(alg, data, datalen, digest);
148 crypto_free_shash(alg);