]> git.ozlabs.org Git - ccan/blobdiff - ccan/crypto/sha256/sha256.h
sha256: Use the same union order as the ctx structure
[ccan] / ccan / crypto / sha256 / sha256.h
index eedaa94ee77df0cfe3e875ec45597f364bbea55f..1297c41f48f0fabbc9bfda41c9dd93627e0c1858 100644 (file)
  */
 struct sha256 {
        union {
-               /* Array of chars */
-               unsigned char u8[32];
-               /* Array of uint32_t */
                uint32_t u32[8];
+               unsigned char u8[32];
        } u;
 };
 
@@ -49,7 +47,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