crypto-algorithms.c

Basic implementations of standard cryptography algorithms, like AES and SHA-1
git clone git://git.finwo.net/lib/crypto-algorithms.c
Log | Files | Refs | README

commit 3beb8dd59872a466ad9f01251700a100c21dd27d
parent cfbde48414baacf51fc7c74f275190881f037d32
Author: Daniel Marjamäki <daniel.marjamaki@gmail.com>
Date:   Thu, 17 May 2018 11:34:18 +0200

sha256: Use standard types uint8_t / uint32_t so types doesn't have to be adjusted manually

Diffstat:
Msha256.h | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sha256.h b/sha256.h @@ -11,13 +11,14 @@ /*************************** HEADER FILES ***************************/ #include <stddef.h> +#include <stdint.h> /****************************** MACROS ******************************/ #define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest /**************************** DATA TYPES ****************************/ -typedef unsigned char BYTE; // 8-bit byte -typedef unsigned int WORD; // 32-bit word, change to "long" for 16-bit machines +typedef uint8_t BYTE; // 8-bit byte +typedef uint32_t WORD; // 32-bit word typedef struct { BYTE data[64];