diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2025-06-30 09:06:38 -0700 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2025-07-04 10:22:57 -0700 |
| commit | 4c855d5069ee2edbcf62fafc7f1a5d4cfea1bce1 (patch) | |
| tree | 902968ba8927f63f2dfc04ecd89c9fdc2579a760 /include | |
| parent | lib/crypto: sha256: Make library API use strongly-typed contexts (diff) | |
| download | linux-4c855d5069ee2edbcf62fafc7f1a5d4cfea1bce1.tar.gz linux-4c855d5069ee2edbcf62fafc7f1a5d4cfea1bce1.zip | |
lib/crypto: sha256: Propagate sha256_block_state type to implementations
The previous commit made the SHA-256 compression function state be
strongly typed, but it wasn't propagated all the way down to the
implementations of it. Do that now.
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250630160645.3198-8-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/crypto/internal/sha2.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/crypto/internal/sha2.h b/include/crypto/internal/sha2.h index 5a25ccc49388..f0f455477bbd 100644 --- a/include/crypto/internal/sha2.h +++ b/include/crypto/internal/sha2.h @@ -17,9 +17,9 @@ static inline bool sha256_is_arch_optimized(void) return false; } #endif -void sha256_blocks_generic(u32 state[SHA256_STATE_WORDS], +void sha256_blocks_generic(struct sha256_block_state *state, const u8 *data, size_t nblocks); -void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS], +void sha256_blocks_arch(struct sha256_block_state *state, const u8 *data, size_t nblocks); static __always_inline void sha256_choose_blocks( @@ -27,9 +27,9 @@ static __always_inline void sha256_choose_blocks( bool force_generic, bool force_simd) { if (!IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_SHA256) || force_generic) - sha256_blocks_generic(state, data, nblocks); + sha256_blocks_generic((struct sha256_block_state *)state, data, nblocks); else - sha256_blocks_arch(state, data, nblocks); + sha256_blocks_arch((struct sha256_block_state *)state, data, nblocks); } static __always_inline void sha256_finup( |
