diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-02-16 11:07:24 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-29 11:13:10 +0200 |
| commit | e892821530255891460deb5f62282e8c027cfd6c (patch) | |
| tree | 1334c2277f23ad803bcfc4b061db41c6cf318601 /include | |
| parent | 734978489f3135e8312175a75a9f85ae75abf911 (diff) | |
| download | linux-e892821530255891460deb5f62282e8c027cfd6c.tar.gz linux-e892821530255891460deb5f62282e8c027cfd6c.tar.bz2 linux-e892821530255891460deb5f62282e8c027cfd6c.zip | |
crypto: ahash - Set default reqsize from ahash_alg
[ Upstream commit 9e01aaa1033d6e40f8d7cf4f20931a61ce9e3f04 ]
Add a reqsize field to struct ahash_alg and use it to set the
default reqsize so that algorithms with a static reqsize are
not forced to create an init_tfm function.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/crypto/hash.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h index 2d5ea9f9ff43..6692253f0b5b 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h @@ -132,6 +132,7 @@ struct ahash_request { * This is a counterpart to @init_tfm, used to remove * various changes set in @init_tfm. * @clone_tfm: Copy transform into new object, may allocate memory. + * @reqsize: Size of the request context. * @halg: see struct hash_alg_common */ struct ahash_alg { @@ -148,6 +149,8 @@ struct ahash_alg { void (*exit_tfm)(struct crypto_ahash *tfm); int (*clone_tfm)(struct crypto_ahash *dst, struct crypto_ahash *src); + unsigned int reqsize; + struct hash_alg_common halg; }; |
