diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2023-04-20 12:05:16 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-05-12 12:48:01 +0200 |
commit | c7535fb2ddf695fbb8b2c2b935307e33556082de (patch) | |
tree | 1cd9d1ad6f646664da155aae77498cb6c05676e2 /include/crypto/internal | |
parent | crypto: ixp4xx - silence uninitialized variable warning (diff) | |
download | linux-c7535fb2ddf695fbb8b2c2b935307e33556082de.tar.xz linux-c7535fb2ddf695fbb8b2c2b935307e33556082de.zip |
crypto: hash - Add statesize to crypto_ahash
As ahash drivers may need to use fallbacks, their state size
is thus variable. Deal with this by making it an attribute
of crypto_ahash.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/internal')
-rw-r--r-- | include/crypto/internal/hash.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h index 37edf3f4e8af..b925f82206ef 100644 --- a/include/crypto/internal/hash.h +++ b/include/crypto/internal/hash.h @@ -149,6 +149,12 @@ static inline struct ahash_alg *__crypto_ahash_alg(struct crypto_alg *alg) halg); } +static inline void crypto_ahash_set_statesize(struct crypto_ahash *tfm, + unsigned int size) +{ + tfm->statesize = size; +} + static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm, unsigned int reqsize) { |