Permalink
Browse files

reorganize contextes structures to make sure every fields falls on a …

…64 aligned address.
  • Loading branch information...
vincenthz committed May 26, 2010
1 parent ad14d1c commit 3dbd256f4ae57dad7463413f38f3a964467d8a54
Showing with 12 additions and 12 deletions.
  1. +2 −2 cbits/md4.h
  2. +2 −2 cbits/md5.h
  3. +2 −2 cbits/ripemd.h
  4. +2 −2 cbits/sha1.h
  5. +2 −2 cbits/sha256.h
  6. +2 −2 cbits/sha512.h
View
@@ -28,9 +28,9 @@
struct md4_ctx
{
- uint32_t h[4];
- uint8_t buf[64];
uint64_t sz;
+ uint8_t buf[64];
+ uint32_t h[4];
};
#define MD4_DIGEST_SIZE 16
View
@@ -28,9 +28,9 @@
struct md5_ctx
{
- uint32_t h[4];
- uint8_t buf[64];
uint64_t sz;
+ uint8_t buf[64];
+ uint32_t h[4];
};
#define MD5_DIGEST_SIZE 16
View
@@ -28,9 +28,9 @@
struct ripemd160_ctx
{
- uint32_t h[5];
- uint8_t buf[64];
uint64_t sz;
+ uint8_t buf[64];
+ uint32_t h[5];
};
#define RIPEMD160_DIGEST_SIZE 20
View
@@ -28,9 +28,9 @@
struct sha1_ctx
{
- uint32_t h[5];
- uint8_t buf[64];
uint64_t sz;
+ uint8_t buf[64];
+ uint32_t h[5];
};
#define SHA1_DIGEST_SIZE 20
View
@@ -29,9 +29,9 @@
struct sha256_ctx
{
- uint32_t h[8];
- uint8_t buf[128];
uint64_t sz;
+ uint8_t buf[128];
+ uint32_t h[8];
};
#define sha224_ctx sha256_ctx
View
@@ -28,9 +28,9 @@
struct sha512_ctx
{
- uint64_t h[8];
- uint8_t buf[128];
uint64_t sz[2];
+ uint8_t buf[128];
+ uint64_t h[8];
};
#define sha384_ctx sha512_ctx

0 comments on commit 3dbd256

Please sign in to comment.