Lines Matching defs:desc
36 static int crypto_sha256_init(struct shash_desc *desc)
38 sha256_init(shash_desc_ctx(desc));
42 static int crypto_sha224_init(struct shash_desc *desc)
44 sha224_init(shash_desc_ctx(desc));
48 int crypto_sha256_update(struct shash_desc *desc, const u8 *data,
51 sha256_update(shash_desc_ctx(desc), data, len);
56 static int crypto_sha256_final(struct shash_desc *desc, u8 *out)
58 if (crypto_shash_digestsize(desc->tfm) == SHA224_DIGEST_SIZE)
59 sha224_final(shash_desc_ctx(desc), out);
61 sha256_final(shash_desc_ctx(desc), out);
65 int crypto_sha256_finup(struct shash_desc *desc, const u8 *data,
68 sha256_update(shash_desc_ctx(desc), data, len);
69 return crypto_sha256_final(desc, hash);