Lines Matching defs:desc
24 static int init_desc(struct hash_desc *desc)
28 desc->tfm = crypto_alloc_hash(ima_hash, 0, CRYPTO_ALG_ASYNC);
29 if (IS_ERR(desc->tfm)) {
31 ima_hash, PTR_ERR(desc->tfm));
32 rc = PTR_ERR(desc->tfm);
35 desc->flags = 0;
36 rc = crypto_hash_init(desc);
38 crypto_free_hash(desc->tfm);
47 struct hash_desc desc;
53 rc = init_desc(&desc);
76 rc = crypto_hash_update(&desc, sg, rbuf_len);
82 rc = crypto_hash_final(&desc, digest);
84 crypto_free_hash(desc.tfm);
93 struct hash_desc desc;
97 rc = init_desc(&desc);
102 rc = crypto_hash_update(&desc, sg, template_len);
104 rc = crypto_hash_final(&desc, digest);
105 crypto_free_hash(desc.tfm);
123 struct hash_desc desc;
128 rc = init_desc(&desc);
137 rc = crypto_hash_update(&desc, &sg, IMA_DIGEST_SIZE);
140 crypto_hash_final(&desc, digest);
141 crypto_free_hash(desc.tfm);