Revert commit 33af72df in order to not depend on test code
Signed-off-by: Michael Schuster <michael@schuster.ms>
diff --git a/programs/cipher/cipher_aead_demo.c b/programs/cipher/cipher_aead_demo.c
index 60a5ea2..853ec20 100644
--- a/programs/cipher/cipher_aead_demo.c
+++ b/programs/cipher/cipher_aead_demo.c
@@ -35,8 +35,6 @@
#include "mbedtls/cipher.h"
-#include <test/helpers.h>
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -80,6 +78,16 @@
* 32-byte is enough to all the key size supported by this program. */
const unsigned char key_bytes[32] = { 0x2a };
+/* Print the contents of a buffer in hex */
+void print_buf(const char *title, unsigned char *buf, size_t len)
+{
+ printf("%s:", title);
+ for (size_t i = 0; i < len; i++) {
+ printf(" %02x", buf[i]);
+ }
+ printf("\n");
+}
+
/* Run an Mbed TLS function and bail out if it fails.
* A string description of the error code can be recovered with:
* programs/util/strerror <value> */
@@ -190,7 +198,7 @@
p += tag_len;
olen = p - out;
- mbedtls_test_print_buf("out", out, olen);
+ print_buf("out", out, olen);
exit:
return ret;