Skip to content

Commit

Permalink
Update sha3iuf-d.h to match sha3.d
Browse files Browse the repository at this point in the history
  • Loading branch information
n8sh committed Mar 27, 2021
1 parent 8d6623f commit 4ecd521
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/sha3iuf-d.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ typedef struct sha3_context_
* 0..7--the next byte after the set one
* (starts from 0; 0--none are buffered)
*/
uint8_t byteIndex;
uint32_t byteIndex;

/*
* 0..24--the next word to integrate input
* (starts from 0)
*/
uint8_t wordIndex;
uint32_t wordIndex;

/*
* the double size of the hash output in
* words (e.g. 16 for Keccak 512)
*/
uint8_t capacityWords;
uint32_t capacityWords;
} sha3_context;

enum SHA3_FLAGS
Expand All @@ -78,7 +78,7 @@ enum SHA3_RETURN
typedef enum SHA3_RETURN sha3_return_t;

/* For Init or Reset call these: */
sha3_return_t sha3_Init(void* priv, uint8_t bitSize);
sha3_return_t sha3_Init(void* priv, uint32_t bitSize);

void sha3_Init256(void* priv);
void sha3_Init384(void* priv);
Expand All @@ -91,9 +91,9 @@ void sha3_Update(void* priv, void const* bufIn, size_t len);
void const* sha3_Finalize(void* priv);

/* Single-call hashing */
sha3_return_t sha3_HashBuffer(uint8_t bitSize, /* 256, 384, 512 */
sha3_return_t sha3_HashBuffer(uint32_t bitSize, /* 256, 384, 512 */
enum SHA3_FLAGS flags, /* SHA3_FLAGS_NONE or SHA3_FLAGS_KECCAK */
const void* in_, uint8_t inBytes, void* out_, uint8_t outBytes); /* up to bitSize/8; truncation OK */
const void* in_, size_t inBytes, void* out_, uint32_t outBytes); /* up to bitSize/8; truncation OK */

#ifdef __cplusplus
}
Expand Down

0 comments on commit 4ecd521

Please sign in to comment.