aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/crypto/internal/hash.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h
index 44d3bcdce6e..6cc824b7933 100644
--- a/include/crypto/internal/hash.h
+++ b/include/crypto/internal/hash.h
@@ -38,6 +38,10 @@ struct shash_instance {
38 struct shash_alg alg; 38 struct shash_alg alg;
39}; 39};
40 40
41struct crypto_shash_spawn {
42 struct crypto_spawn base;
43};
44
41extern const struct crypto_type crypto_ahash_type; 45extern const struct crypto_type crypto_ahash_type;
42 46
43int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err); 47int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err);
@@ -52,6 +56,10 @@ int crypto_unregister_shash(struct shash_alg *alg);
52 56
53void shash_free_instance(struct crypto_instance *inst); 57void shash_free_instance(struct crypto_instance *inst);
54 58
59int crypto_init_shash_spawn(struct crypto_shash_spawn *spawn,
60 struct shash_alg *alg,
61 struct crypto_instance *inst);
62
55static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm) 63static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm)
56{ 64{
57 return crypto_tfm_ctx(&tfm->base); 65 return crypto_tfm_ctx(&tfm->base);
@@ -106,5 +114,11 @@ static inline struct shash_instance *shash_alloc_instance(
106 sizeof(struct shash_alg) - sizeof(*alg)); 114 sizeof(struct shash_alg) - sizeof(*alg));
107} 115}
108 116
117static inline struct crypto_shash *crypto_spawn_shash(
118 struct crypto_shash_spawn *spawn)
119{
120 return crypto_spawn_tfm2(&spawn->base);
121}
122
109#endif /* _CRYPTO_INTERNAL_HASH_H */ 123#endif /* _CRYPTO_INTERNAL_HASH_H */
110 124