From 7219d3c0e9639463ec26e5035b6046b1b9964ce6 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 5 Aug 2022 15:35:15 +0200 Subject: libtest: Add T_report_hash_sha256_update() Update #3716. --- cpukit/include/rtems/test.h | 2 ++ cpukit/libtest/t-test-hash-sha256.c | 9 +++++++++ 2 files changed, 11 insertions(+) (limited to 'cpukit') diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h index 305fe3f5f3..c283be7860 100644 --- a/cpukit/include/rtems/test.h +++ b/cpukit/include/rtems/test.h @@ -2464,6 +2464,8 @@ T_thread_switch_log *T_thread_switch_record_10(T_thread_switch_log_10 *); void T_report_hash_sha256(T_event, const char *); +void T_report_hash_sha256_update(char c); + void T_check_heap(T_event, const char *); #ifdef __rtems__ diff --git a/cpukit/libtest/t-test-hash-sha256.c b/cpukit/libtest/t-test-hash-sha256.c index 32e946b4cf..a023d3969c 100644 --- a/cpukit/libtest/t-test-hash-sha256.c +++ b/cpukit/libtest/t-test-hash-sha256.c @@ -44,6 +44,15 @@ typedef struct { static T_report_hash_sha256_context T_report_hash_sha256_instance; +void +T_report_hash_sha256_update(char c) +{ + T_report_hash_sha256_context *ctx; + + ctx = &T_report_hash_sha256_instance; + SHA256_Update(&ctx->sha256, &c, sizeof(c)); +} + static void T_report_hash_sha256_putchar(int c, void *arg) { -- cgit v1.2.3