libtest: Add T_report_hash_sha256_update()

Update #3716.
This commit is contained in:
Sebastian Huber
2022-08-05 15:35:15 +02:00
parent 5500232a89
commit 7219d3c0e9
2 changed files with 11 additions and 0 deletions

View File

@@ -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__

View File

@@ -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)
{