Move print_buf into mbedtls_test_print_buf helper function in sample programs
Reduce code duplication and fix missing-prototype error for print_buf
Signed-off-by: Michael Schuster <michael@schuster.ms>
diff --git a/tests/include/test/helpers.h b/tests/include/test/helpers.h
index d08100f..10b321d 100644
--- a/tests/include/test/helpers.h
+++ b/tests/include/test/helpers.h
@@ -381,6 +381,9 @@
int mbedtls_test_hexcmp(uint8_t *a, uint8_t *b,
uint32_t a_len, uint32_t b_len);
+/* Print the contents of a buffer in hex */
+void mbedtls_test_print_buf(const char *title, unsigned char *buf, size_t len);
+
#if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
#include "test/fake_external_rng_for_test.h"
#endif