From ccc3d23b29eeb4c1ace83ae93f415d7a3d57ed45 Mon Sep 17 00:00:00 2001 From: Alain Mosnier Date: Wed, 13 Dec 2017 12:00:03 +0100 Subject: [PATCH] Added comment. --- sha-256.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sha-256.c b/sha-256.c index 26c7698..e2177f3 100644 --- a/sha-256.c +++ b/sha-256.c @@ -134,6 +134,9 @@ static int calc_chunk(uint8_t chunk[CHUNK_SIZE], struct buffer_state * state) * - sizeof size_t is assumed to be either 8, 16, 32 or 64. Otherwise, the results are unpredictable. * - Since input is a pointer in RAM, the data to hash should be in RAM, which could be a problem * for large data sizes. + * - SHA algorithms theoritically operate on bit strings. However, this implementation has no support + * for bit string lengths that are not multiples of eight, and it really operates on arrays of bytes. + * the len parameter is a number of bytes. */ void calc_sha_256(uint8_t hash[32], const void * input, size_t len) {