mccu/include/mcutil/hash/md5.h
2025-01-29 23:21:18 +02:00

23 lines
534 B
C

// Taken from https://breder.org/md5-implementation
// Author header continues below
// MD5 (Message-Digest Algorithm 5)
// Copyright Victor Breder 2024
// SPDX-License-Identifier: MIT
#ifndef _H_MCU_HASH_MD5
#define _H_MCU_HASH_MD5
#include <stddef.h>
#include <stdint.h>
typedef struct {
uint32_t a, b, c, d;
} mcu_md5_context;
void mcu_md5_init(mcu_md5_context* ctx);
void mcu_md5_digest(mcu_md5_context* ctx, void* buffer, size_t size);
void mcu_md5_output(mcu_md5_context* ctx, uint8_t out[16]);
#endif // _H_MCU_HASH_MD5