Add SHA-256 checksum calculation support

This commit is contained in:
2025-10-03 02:03:39 +01:00
parent 1e569c68a1
commit 79ac2e380c
10 changed files with 329 additions and 124 deletions

View File

@@ -22,6 +22,7 @@
#include "crc64.h"
#include "md5.h"
#include "sha1.h"
#include "sha256.h"
#include "simd.h"
#include "spamsum.h"
#ifdef __cplusplus
@@ -169,6 +170,11 @@ AARU_EXPORT void AARU_CALL aaruf_sha1_update(sha1_ctx *ctx, const void *data, un
AARU_EXPORT void AARU_CALL aaruf_sha1_final(sha1_ctx *ctx, unsigned char *result);
AARU_EXPORT void AARU_CALL aaruf_sha1_buffer(const void *data, unsigned long size, unsigned char *result);
AARU_EXPORT void AARU_CALL aaruf_sha256_init(sha256_ctx *ctx);
AARU_EXPORT void AARU_CALL aaruf_sha256_update(sha256_ctx *ctx, const void *data, unsigned long size);
AARU_EXPORT void AARU_CALL aaruf_sha256_final(sha256_ctx *ctx, unsigned char *result);
AARU_EXPORT void AARU_CALL aaruf_sha256_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)