Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Whirlpool: use exact-width fields in context struct
Browse files Browse the repository at this point in the history
Although uint8_t seems to suffice, this gives rise to field alignment issues when playing together with the Haskell module.
  • Loading branch information
Stijn van Drongelen committed Aug 11, 2012
1 parent 74d142c commit 7b1d40a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cbits/whirlpool_nessie.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ typedef unsigned __int64 uint64_t;
typedef struct NESSIEstruct {
uint8_t bitLength[LENGTHBYTES]; /* global number of hashed bits (256-bit counter) */
uint8_t buffer[WBLOCKBYTES]; /* buffer of data to hash */
int bufferBits; /* current number of bits on the buffer */
int bufferPos; /* current (possibly incomplete) byte slot on the buffer */
uint32_t bufferBits; /* current number of bits on the buffer */
uint32_t bufferPos; /* current (possibly incomplete) byte slot on the buffer */
uint64_t hash[DIGESTBYTES/8]; /* the hashing state */
} NESSIEstruct;

Expand Down

0 comments on commit 7b1d40a

Please sign in to comment.