sha256: Make our u32 and u8 fields the same size
authorJon Griffiths <jon_p_griffiths@yahoo.com>
Tue, 22 Mar 2016 22:49:48 +0000 (11:49 +1300)
committerJon Griffiths <jon_p_griffiths@yahoo.com>
Mon, 22 Aug 2016 12:29:34 +0000 (00:29 +1200)
These are just aliases to a buffer: its customary for these to
have the same size, and makes sizeof() consistent in case anyone
decides to use the members instead of the containing union.

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
ccan/crypto/sha256/sha256.h

index eedaa94ee77df0cfe3e875ec45597f364bbea55f..3e1a4919b9210269809824ff8797a24e8860251e 100644 (file)
@@ -49,7 +49,7 @@ struct sha256_ctx {
        uint32_t s[8];
        uint64_t bytes;
        union {
-               uint32_t u32[8];
+               uint32_t u32[16];
                unsigned char u8[64];
        } buf;
 #endif