From 317df86ba3b392410cb3e7d6ac99e182cdd2ea3c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 25 Jan 2024 17:51:06 +0100 Subject: base64: Move base64 encoding support --- cpukit/libtest/gcovdumpinfobase64.c | 6 ++++-- cpukit/libtest/t-test-hash-sha256.c | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'cpukit/libtest') diff --git a/cpukit/libtest/gcovdumpinfobase64.c b/cpukit/libtest/gcovdumpinfobase64.c index 0b8d901c69..f75d157ab9 100644 --- a/cpukit/libtest/gcovdumpinfobase64.c +++ b/cpukit/libtest/gcovdumpinfobase64.c @@ -43,6 +43,8 @@ #include #include +#include + typedef struct { IO_Put_char put_char; void *arg; @@ -77,7 +79,7 @@ static void _Gcov_Base64_encode( int c, void *arg ) if ( index == RTEMS_ARRAY_SIZE( ctx->buf ) - 1 ) { index = 0; - _IO_Base64( + _Base64_Encode( _Gcov_Base64_put_char, ctx, ctx->buf, @@ -100,5 +102,5 @@ void _Gcov_Dump_info_base64( IO_Put_char put_char, void *arg ) ctx.put_char = put_char; ctx.arg = arg; _Gcov_Dump_info( _Gcov_Base64_encode, &ctx ); - _IO_Base64( _Gcov_Base64_put_char, &ctx, ctx.buf, ctx.index, NULL, INT_MAX ); + _Base64_Encode( _Gcov_Base64_put_char, &ctx, ctx.buf, ctx.index, NULL, INT_MAX ); } diff --git a/cpukit/libtest/t-test-hash-sha256.c b/cpukit/libtest/t-test-hash-sha256.c index b83285326b..79da4b5dfb 100644 --- a/cpukit/libtest/t-test-hash-sha256.c +++ b/cpukit/libtest/t-test-hash-sha256.c @@ -35,7 +35,6 @@ */ #include -#include #include @@ -45,6 +44,8 @@ #include #endif +#include + typedef struct { SHA256_CTX sha256; T_putchar putchar; @@ -94,7 +95,7 @@ T_report_hash_sha256_finalize(void) ctx = &T_report_hash_sha256_instance; SHA256_Final(hash, &ctx->sha256); T_printf("Y:ReportHash:SHA256:"); - (void)_IO_Base64url(ctx->putchar, ctx->putchar_arg, hash, + (void)_Base64url_Encode(ctx->putchar, ctx->putchar_arg, hash, sizeof(hash), NULL, INT_MAX); T_printf("\n"); } -- cgit v1.2.3