tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH 1/2] Fix sha2.c build with -Werror=array-parameter enabled
---
common/lib/libc/hash/sha2/sha2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/lib/libc/hash/sha2/sha2.c b/common/lib/libc/hash/sha2/sha2.c
index 27ace13bcbaa..56012ba20707 100644
--- a/common/lib/libc/hash/sha2/sha2.c
+++ b/common/lib/libc/hash/sha2/sha2.c
@@ -572,7 +572,7 @@ SHA224_256_Final(uint8_t digest[], SHA256_CTX *context, size_t len)
}
int
-SHA256_Final(uint8_t digest[], SHA256_CTX *context)
+SHA256_Final(uint8_t digest[SHA256_DIGEST_LENGTH], SHA256_CTX *context)
{
return SHA224_256_Final(digest, context, SHA256_DIGEST_LENGTH);
}
@@ -606,7 +606,7 @@ SHA224_Transform(SHA224_CTX *context, const uint32_t *data)
}
int
-SHA224_Final(uint8_t digest[], SHA224_CTX *context)
+SHA224_Final(uint8_t digest[SHA224_DIGEST_LENGTH], SHA224_CTX *context)
{
return SHA224_256_Final(digest, (SHA256_CTX *)context,
SHA224_DIGEST_LENGTH);
@@ -899,7 +899,7 @@ SHA512_Last(SHA512_CTX *context)
}
int
-SHA512_Final(uint8_t digest[], SHA512_CTX *context)
+SHA512_Final(uint8_t digest[SHA512_DIGEST_LENGTH], SHA512_CTX *context)
{
size_t i;
@@ -946,7 +946,7 @@ SHA384_Transform(SHA512_CTX *context, const uint64_t *data)
}
int
-SHA384_Final(uint8_t digest[], SHA384_CTX *context)
+SHA384_Final(uint8_t digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context)
{
size_t i;
--
2.33.1
Home |
Main Index |
Thread Index |
Old Index