Add MD5 implementation and integrate with existing codebase

This commit is contained in:
2025-10-02 22:16:02 +01:00
parent 1c0c9cbf71
commit 8f9abf7288
6 changed files with 400 additions and 2 deletions

View File

@@ -19,6 +19,8 @@
#ifndef LIBAARUFORMAT_DECLS_H
#define LIBAARUFORMAT_DECLS_H
#include "crc64.h"
#include "md5.h"
#include "simd.h"
#include "spamsum.h"
#ifdef __cplusplus
@@ -156,6 +158,11 @@ AARU_EXPORT int32_t AARU_CALL aaruf_lzma_encode_buffer(uint8_t *dst_buffer, size
int32_t level, uint32_t dict_size, int32_t lc, int32_t lp,
int32_t pb, int32_t fb, int32_t num_threads);
AARU_EXPORT void AARU_CALL aaruf_md5_init(md5_ctx *ctx);
AARU_EXPORT void AARU_CALL aaruf_md5_update(md5_ctx *ctx, const void *data, unsigned long size);
AARU_EXPORT void AARU_CALL aaruf_md5_final(md5_ctx *ctx, unsigned char *result);
AARU_EXPORT void AARU_CALL aaruf_md5_buffer(const void *data, unsigned long size, unsigned char *result);
#if defined(__x86_64__) || defined(__amd64) || defined(_M_AMD64) || defined(_M_X64) || defined(__I386__) || \
defined(__i386__) || defined(__THW_INTEL) || defined(_M_IX86)