34#define DIGEST_BLOCKSIZE 64
void digestFinish(Digest *digest, uint8 *out)
uint32 DigestSize[DIGEST_COUNT]
#define DIGEST_BLOCKSIZE
Internal block size in bytes used by all supported digest algorithms.
void digestInit(Digest *digest, DigestType type)
void digestUpdate(Digest *digest, uint8 *data, uint32 size)
DigestType
Supported message digest algorithms.
@ DIGEST_SHA1
SHA-1 - 160-bit (20 bytes) - Deprecated for security.
@ DIGEST_SHA256
SHA-256 - 256-bit (32 bytes) - Secure and recommended.
@ DIGEST_MD5
MD5 - 128-bit (16 bytes) - Not cryptographically secure.
uint32 size
Total message size processed.
uint32 state[8]
Algorithm state (MD5: 4 words, SHA-1: 5 words, SHA-256: 8 words)
uint8 buffer[DIGEST_BLOCKSIZE]
Internal data buffer.
DigestType type
Algorithm being used.