[rtems commit] libtest: Add T_report_hash_sha256_update()
Sebastian Huber
sebh at rtems.org
Wed Aug 10 05:43:50 UTC 2022
Module: rtems
Branch: master
Commit: 7219d3c0e9639463ec26e5035b6046b1b9964ce6
Changeset: http://git.rtems.org/rtems/commit/?id=7219d3c0e9639463ec26e5035b6046b1b9964ce6
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Aug 5 15:35:15 2022 +0200
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(+)
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)
{
More information about the vc
mailing list