diff options
author | Loic Poulain | 2022-06-01 20:26:28 +0200 |
---|---|---|
committer | Tom Rini | 2022-06-27 13:36:28 -0400 |
commit | 4e883522bad7f1fed4ce0e35d26080fe29a972a5 (patch) | |
tree | da90c020ff6e1b8ecdabf577c4858c7588e486ec /include/u-boot/sha1.h | |
parent | 8201b8066a898c1ae72af45dbda8950410ee4743 (diff) |
sha1: Fix digest state size/type
sha1 digest size is 5*32-bit => 160-bit. Using 64-bit unsigned long
does not cause issue with the current sha1 implementation, but could
be problematic for vectorized access.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Diffstat (limited to 'include/u-boot/sha1.h')
-rw-r--r-- | include/u-boot/sha1.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/u-boot/sha1.h b/include/u-boot/sha1.h index 283f1032936..09fee594d26 100644 --- a/include/u-boot/sha1.h +++ b/include/u-boot/sha1.h @@ -30,7 +30,7 @@ extern const uint8_t sha1_der_prefix[]; typedef struct { unsigned long total[2]; /*!< number of bytes processed */ - unsigned long state[5]; /*!< intermediate digest state */ + uint32_t state[5]; /*!< intermediate digest state */ unsigned char buffer[64]; /*!< data block being processed */ } sha1_context; |